Coder Social home page Coder Social logo

Comments (5)

nvuillam avatar nvuillam commented on June 6, 2024 1

@pjungermann I would prefer the option where OPENAPI_SPECTRAL can handle sync + async APIs ^^

Ypu could rename the default config file as .spectral.yml, and put the mixed config in default content

extends:
  - spectral:asyncapi
  - spectral:oas

Semantically, OPENAPI_SPECTRAL would analyze openapi + asyncapi , but i wouldn't like to create a new descriptor for each new capability

Another solution might be to deprecate OPENAPI descriptor and create a new descriptor API that would contain API_SPECTRAL, but in my opinion that's not mandatory

from megalinter.

nvuillam avatar nvuillam commented on June 6, 2024 1

@pjungermann great :)

In order to ensure compatibility until the next major release (usually once a year), please do not remove the openapi descriptor, just add deprecated and create a new api descriptor aside :)

from megalinter.

nvuillam avatar nvuillam commented on June 6, 2024

@pjungermann would it just work if we update default config file shipped with MegaLinter ?

If not, we could also update the doc to tell to override the config file name using variable OPENAPI_SPECTRAL_CONFIG_FILE

Would you like to make a PR ? :)

from megalinter.

pjungermann avatar pjungermann commented on June 6, 2024

@nvuillam updating the config file would be a viable option (+ updating docs).

  1. reuse same linter and config file
  2. separate linter
    1. separate config files (users could override it if they want to use one for both)
    2. shared config file
      1. stick to current file name
      2. use filename as of Spectral's docs

Based on the setup for other linters, I assumed there might be a preference for ASYNCAPI_SPECTRAL.

I'm willing to provide a PR. Before, I wanted to find out the right solution for this project.

from megalinter.

pjungermann avatar pjungermann commented on June 6, 2024

I like the idea of changing OPENAPI to API as linter grouping πŸ‘

I will have a look at preparing the necessary changes.

from megalinter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.