openapi-spec-validator icon indicating copy to clipboard operation
openapi-spec-validator copied to clipboard

OpenAPI Spec Validator is a CLI, pre-commit hook and python package that validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger), OpenAPI 3.0 and OpenAPI 3.1 specification.

Results 79 openapi-spec-validator issues
Sort by recently updated
recently updated
newest added

When I validate a spec containing a $ref pointing to a file then I get an error like jsonschema.exceptions.RefResolutionError: unknown url type: '../shared.yaml' At the jsonschema level this makes some...

**pattern: '^(?i)one|two|three$'** The regex does not validate. *(?i)* is the issue. It allows case-insensitive pattern match. It causes this error in swagger-editor: Structural error at components.schemas.Session.properties.operation.pattern should match format "regex"...

Links without operationId (and maybe description, too) aren't marked as invalid.

Component names aren't validated, e.g. if a model contains a `/`. https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#componentsObject > All the fixed fields declared above are objects that MUST use keys that match the regular expression:...

Try validating against the schema from https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/ Got error of ``` Failed validating 'oneOf' in schema['properties']['paths']['patternProperties']['^/']['properties']['patch']['properties']['requestBody']: {'oneOf': [{'$ref': '#/definitions/requestBody'}, {'$ref': '#/definitions/reference'}]} ``` Source spec file ``` paths: /pets: patch: requestBody:...

Validation should fail when an object has an item in the required list that isn't defined in properties. Validation fails as expected when an object is defined on the top...

kind/bug/confirmed

As all different types of request bodies should be processed by the same function, I was hoping to do something the following minimal example: ```paths: /api/{item_type}: post: parameters: - in:...

resolution/invalid

I'm working on some code that imports an OpenAPI spec, modifies it, and outputs a new one. I'd prefer not to have the spec modified by the validator; the addition...

kind/enhancement

### Description According to the [OpenAPI 3.0 specification for the pattern attribute](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#schema-object) of a schema object, the pattern provided should comply with [ECMA 262 regular expression syntax](https://www.ecma-international.org/ecma-262/5.1/#sec-7.8.5). The syntax defined...

An array without specified `items:` passes validation. From [swagger.io](https://swagger.io/docs/specification/data-models/data-types/#array): > the items keyword is required in arrays ### Example (correct version) ```yaml definitions: Pet: required: - id - name properties:...