Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/oas.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ In addition to the required fields, at least one of the `components`, `paths`, o

| Field Name | Type | Description |
| ---- | :----: | ---- |
| <a name="oas-version"></a>openapi | `string` | **REQUIRED**. This string MUST be the [version number](#versions-and-deprecation) of the OpenAPI Specification that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling to interpret the OpenAPI document. This is _not_ related to the [`info.version`](#info-version) string, which describes the OpenAPI document's version. |
| <a name="oas-version"></a>openapi | `string` | **REQUIRED**. This string MUST be the major and minor [version number](#versions-and-deprecation) of the OpenAPI Specification that the OpenAPI document uses (e.g. `"3.2"`), and MAY also contain the patch number (e.g. `"3.2.0"`). The major and minor version numbers from the `openapi` field MUST be used by tooling to interpret the OpenAPI document, while the patch number SHOULD be ignored. This field is _not_ related to the [`info.version`](#info-version) string, which describes the OpenAPI document's version. |
| <a name="oas-self"></a>$self | `string` | This string MUST be in the form of a URI reference as defined by [[RFC3986]] [Section 4.1](https://www.rfc-editor.org/rfc/rfc3986#section-4.1). The `$self` field provides the self-assigned URI of this document, which also serves as its base URI in accordance with [[RFC3986]] [Section 5.1.1](https://www.rfc-editor.org/rfc/rfc3986#section-5.1.1). Implementations MUST support identifying the targets of [API description URIs](#relative-references-in-api-description-uris) using the URI defined by this field when it is present. See [Establishing the Base URI](#establishing-the-base-uri) for the base URI behavior when `$self` is absent or relative, and see [Appendix F]((#appendix-f-examples-of-base-uri-determination-and-reference-resolution)) for examples of using `$self` to resolve references. |
| <a name="oas-info"></a>info | [Info Object](#info-object) | **REQUIRED**. Provides metadata about the API. The metadata MAY be used by tooling as required. |
| <a name="oas-json-schema-dialect"></a> jsonSchemaDialect | `string` | The default value for the `$schema` keyword within [Schema Objects](#schema-object) contained within this OAS document. This MUST be in the form of a URI. |
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/validation/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type: object
properties:
openapi:
type: string
pattern: '^3\.2\.\d+(-.+)?$'
pattern: '^3\.2(\.\d+)?$'
$self:
type: string
format: uri-reference
Expand Down
2 changes: 1 addition & 1 deletion tests/schema/pass/info-object-example.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# including External Documentation Object Example
openapi: 3.2.0
openapi: "3.2"
$self: https://example.com/openapi
info:
title: Example Pet Store App
Expand Down
2 changes: 1 addition & 1 deletion tests/schema/pass/mega.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.2.0
openapi: "3.2"
info:
summary: My API's summary
title: My API
Expand Down
2 changes: 1 addition & 1 deletion tests/schema/pass/minimal_comp.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.2.0
openapi: "3.2"
info:
title: API
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion tests/schema/pass/minimal_hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.2.0
openapi: "3.2"
info:
title: API
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion tests/schema/pass/minimal_paths.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.2.0
openapi: "3.2"
info:
title: API
version: 1.0.0
Expand Down