This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extends: spectral:oas | |
| rules: | |
| oas3-schema: error | |
| info-contact: off | |
| paths-kebab-case: | |
| description: Paths should be kebab-case. | |
| message: "gist spectral-valid.yaml {{property}} AAAAshould be kebab-case (lower-case and separated with hyphens)" | |
| severity: warn | |
| given: $.paths[*]~ | |
| then: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openapi: 3.0.4 | |
| info: | |
| title: Swagger Petstore - OpenAPI 3.0 | |
| description: |- | |
| This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about | |
| Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach! | |
| You can now help us improve the API whether it's by making changes to the definition itself or to the code. | |
| That way, with time, we can improve the API in general, and expose some of the new features in OAS3. | |
| Some useful links: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # OpenAPI version identifier - required for OpenAPI 3.0 domains | |
| openapi: 3.0.0 | |
| ####################### | |
| # Optional info section | |
| ####################### | |
| info: | |
| title: Acme Components | |
| description: Common components for Acme REST APIs | |
| version: '2' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openapi: 3.0.3 | |
| info: | |
| version: "1.0.0" | |
| title: Simple Inventory API | |
| paths: | |
| /inventory: | |
| get: | |
| operationId: searchInventory | |
| parameters: | |
| - in: header |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "openapi" : "3.1.0", | |
| "info" : { | |
| "title" : "Swagger Petstore - OpenAPI 3.1", | |
| "description" : "This is a sample Pet Store Server based on the OpenAPI 3.1 specification.\nYou can find out more about\nSwagger at [http://swagger.io](http://swagger.io).", | |
| "termsOfService" : "http://swagger.io/terms/", | |
| "contact" : { | |
| "email" : "apiteam@swagger.io" | |
| }, | |
| "license" : { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "openapi" : "3.1.0", | |
| "info" : { | |
| "title" : "Swagger Petstore - OpenAPI 3.1", | |
| "description" : "This is a sample Pet Store Server based on the OpenAPI 3.1 specification.\nYou can find out more about\nSwagger at [http://swagger.io](http://swagger.io).", | |
| "termsOfService" : "http://swagger.io/terms/", | |
| "contact" : { | |
| "email" : "apiteam@swagger.io" | |
| }, | |
| "license" : { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "openapi" : "3.1.0", | |
| "info" : { | |
| "title" : "Swagger Petstore - OpenAPI 3.1", | |
| "description" : "This is a sample Pet Store Server based on the OpenAPI 3.1 specification.\nYou can find out more about\nSwagger at [http://swagger.io](http://swagger.io).", | |
| "termsOfService" : "http://swagger.io/terms/", | |
| "contact" : { | |
| "email" : "apiteam@swagger.io" | |
| }, | |
| "license" : { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| validateReference sync execution with refSet caching | |
| */ | |
| import { CodeAction, Diagnostic, DiagnosticSeverity, Range } from 'vscode-languageserver-types'; | |
| import { TextDocument } from 'vscode-languageserver-textdocument'; | |
| import { Element, findAtOffset, traverse, ObjectElement } from '@swagger-api/apidom-core'; | |
| import { CodeActionKind, CodeActionParams } from 'vscode-languageserver-protocol'; | |
| import { evaluate, evaluateMulti } from '@swagger-api/apidom-json-path'; | |
| import { dereferenceApiDOM, Reference, ReferenceSet } from '@swagger-api/apidom-reference'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| validateReference concurrent execution with no refSet caching | |
| */ | |
| import { CodeAction, Diagnostic, DiagnosticSeverity, Range } from 'vscode-languageserver-types'; | |
| import { TextDocument } from 'vscode-languageserver-textdocument'; | |
| import { Element, findAtOffset, traverse, ObjectElement } from '@swagger-api/apidom-core'; | |
| import { CodeActionKind, CodeActionParams } from 'vscode-languageserver-protocol'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "openapi" : "3.1.0", | |
| "info" : { | |
| "title" : "Swagger Petstore - OpenAPI 3.1", | |
| "description" : "This is a sample Pet Store Server based on the OpenAPI 3.1 specification.\nYou can find out more about\nSwagger at [http://swagger.io](http://swagger.io).", | |
| "termsOfService" : "http://swagger.io/terms/", | |
| "contact" : { | |
| "email" : "apiteam@swagger.io" | |
| }, | |
| "license" : { |
NewerOlder