42Crunch / vscode-openapi

VisualStudio Code OpenAPI tools
GNU Affero General Public License v3.0
338 stars 41 forks source link

Linting like Swagger Editor #64

Open segevfiner opened 4 years ago

segevfiner commented 4 years ago

Using Swagger Editor (The web based one from swagger.io). You get a bunch of additional lints/validation that I don't see with this extension installed. It would be nice to have those. They include for example checking that you have correctly declared all path parameters and other such checks that are not purely checking agains't the schema.

I think they are part of the swagger generator (Or openapi-generator fork) as a validate command.

ak1394 commented 4 years ago

Have you tried the 'security audit' feature? It performs a lot of various checks, and it is not solely focused on the security of the api.

segevfiner commented 4 years ago

It looks like it does much more then we require, enforcing a bunch of stuff that we don't really need. It is also an online service and needs to be triggered manually each time. The validation in Swagger editor is on the fly and local.

sebastian-fredriksson-bernholtz commented 3 years ago

This would be great to have!

2zqa commented 5 months ago

Apologies for the necro, but for future reference: you can achieve this using the https://github.com/stoplightio/vscode-spectral extension and adding a default ruleset:

# .spectral.yaml
formats:
  - oas3 # or oas3.1 if you wish to be modern

extends:
  - "spectral:oas"