Skip to content
Merged
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: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix [#49](https://github.com/Neoteroi/essentials-openapi/issues/49): support `$ref`
values of the form `file.yaml#/fragment/path` (external file with JSON Pointer
fragment), reported by @mbklein.
- Fix [#55](https://github.com/Neoteroi/essentials-openapi/issues/55): `jsonSchemaDialect`
is not required and should not have a default value.

## [1.3.0] - 2025-11-19

Expand Down
6 changes: 3 additions & 3 deletions openapidocs/v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,8 +957,8 @@ class OpenAPI(OpenAPIRoot):
Attributes:
openapi (str): The semantic version number of the OpenAPI Specification version.
info (Info | None): Metadata about the API.
json_schema_dialect (str): The default value for the $schema keyword within Schema Objects contained
within this OAS document.
json_schema_dialect (str | None): The default value for the $schema keyword within Schema Objects contained
within this OAS document. Optional; if omitted, the dialect is not declared.
paths (dict[str, PathItem] | None): The available paths and operations for the API.
servers (list[Server] | None): An array of Server Objects that provide connectivity information
to a target server.
Expand All @@ -971,7 +971,7 @@ class OpenAPI(OpenAPIRoot):

openapi: str = "3.1.0"
info: Info | None = None
json_schema_dialect: str = "https://json-schema.org/draft/2020-12/schema"
json_schema_dialect: str | None = None
paths: dict[str, PathItem] | None = None
servers: list[Server] | None = None
components: Components | None = None
Expand Down
16 changes: 0 additions & 16 deletions tests/test_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ def yaml(self) -> str:
info:
title: Cats API
version: 1.0.0
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
paths:
/:
summary: summary
Expand Down Expand Up @@ -214,7 +213,6 @@ def json(self) -> str:
"title": "Cats API",
"version": "1.0.0"
},
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"paths": {
"/": {
"summary": "summary"
Expand Down Expand Up @@ -613,7 +611,6 @@ def yaml(self) -> str:
info:
title: Weather API
version: 0.0.0-alpha
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
paths:
/weather:
summary: Call current weather data for one location
Expand Down Expand Up @@ -683,7 +680,6 @@ def json(self) -> str:
"title": "Weather API",
"version": "0.0.0-alpha"
},
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"paths": {
"/weather": {
"summary": "Call current weather data for one location",
Expand Down Expand Up @@ -831,7 +827,6 @@ def yaml(self) -> str:
info:
title: Example API
version: 0.0.0-alpha
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
paths:
/:
summary: Test the example snake_case properness
Expand Down Expand Up @@ -869,7 +864,6 @@ def json(self) -> str:
"title": "Example API",
"version": "0.0.0-alpha"
},
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"paths": {
"/": {
"summary": "Test the example snake_case properness",
Expand Down Expand Up @@ -976,7 +970,6 @@ def yaml(self) -> str:
info:
title: Example API
version: 0.0.0-alpha
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
paths:
/:
summary: Test the example snake_case properness
Expand Down Expand Up @@ -1022,7 +1015,6 @@ def json(self) -> str:
"title": "Example API",
"version": "0.0.0-alpha"
},
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"paths": {
"/": {
"summary": "Test the example snake_case properness",
Expand Down Expand Up @@ -1153,7 +1145,6 @@ def yaml(self) -> str:
info:
title: Example API
version: 0.0.0-alpha
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
paths:
/:
summary: Test the example snake_case properness
Expand Down Expand Up @@ -1208,7 +1199,6 @@ def json(self) -> str:
"title": "Example API",
"version": "0.0.0-alpha"
},
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"paths": {
"/": {
"summary": "Test the example snake_case properness",
Expand Down Expand Up @@ -1399,7 +1389,6 @@ def yaml(self) -> str:
info:
title: Example API
version: 0.0.0-alpha
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
paths:
/:
description: Lorem ipsum dolor sit amet
Expand Down Expand Up @@ -1499,7 +1488,6 @@ def json(self) -> str:
"title": "Example API",
"version": "0.0.0-alpha"
},
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"paths": {
"/": {
"description": "Lorem ipsum dolor sit amet",
Expand Down Expand Up @@ -1697,7 +1685,6 @@ def yaml(self) -> str:
info:
title: Example API
version: 0.0.0-alpha
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
paths:
/:
summary: Test the example snake_case properness
Expand Down Expand Up @@ -1743,7 +1730,6 @@ def json(self) -> str:
"title": "Example API",
"version": "0.0.0-alpha"
},
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"paths": {
"/": {
"summary": "Test the example snake_case properness",
Expand Down Expand Up @@ -1880,7 +1866,6 @@ def get_instance(self) -> Any:
def yaml(self) -> str:
return """
openapi: 3.1.0
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
servers:
- url: https://{username}.gigantic-server.com:{port}/{basePath}
description: The production API server
Expand All @@ -1902,7 +1887,6 @@ def json(self) -> str:
return """
{
"openapi": "3.1.0",
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"servers": [
{
"url": "https://{username}.gigantic-server.com:{port}/{basePath}",
Expand Down