Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix schema recursive references #371

Merged
merged 5 commits into from
Mar 4, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The schema of each <<input-value-schema,process **input** value>> SHALL be speci

[.component,class=part]
--
The value of the `schema` parameter SHALL be a JSON fragment that validates according to the JSON Schema: https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/openapi/schemas/processes-core/schema-original.yaml[schema.yaml].
The value of the `schema` parameter SHALL be a JSON fragment that validates according to the JSON Schema: https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/openapi/schemas/processes-core/schema.yaml[schema.yaml].
--

[.component,class=part]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ An input that can be of mixed type SHALL be defined using the https://tools.ietf

[.component,class=part]
--
Each sub-schema SHALL be a JSON fragment that validates according to the JSON Schema: https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/openapi/schemas/processes-core/schema-original.yaml[schema.yaml].
Each sub-schema SHALL be a JSON fragment that validates according to the JSON Schema: https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/openapi/schemas/processes-core/schema.yaml[schema.yaml].
--

[.component,class=part]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ The schema of each <<sc_process_outputs,process **output**>> SHALL be specified

[.component,class=part]
--
The value of the `schema` parameter SHALL be a JSON fragment that validates according to the JSON Schema: https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/openapi/schemas/processes-core/schema-original.yaml[schema.yaml].
The value of the `schema` parameter SHALL be a JSON fragment that validates according to the JSON Schema: https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/openapi/schemas/processes-core/schema.yaml[schema.yaml].
--
====
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ An output that can be of mixed type SHALL be defined using the https://tools.iet

[.component,class=part]
--
Each sub-schema SHALL be a JSON fragment that validates according to the JSON Schema: https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/openapi/schemas/schema-original.yaml[schema.yaml].
Each sub-schema SHALL be a JSON fragment that validates according to the JSON Schema: https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/openapi/schemas/schema.yaml[schema.yaml].
--

[.component,class=part]
Expand Down
1 change: 1 addition & 0 deletions openapi/schemas/processes-core/reference.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ properties:
"$ref":
type: string
format: uri-reference
additionalProperties: false
130 changes: 0 additions & 130 deletions openapi/schemas/processes-core/schema-original.yaml

This file was deleted.

28 changes: 8 additions & 20 deletions openapi/schemas/processes-core/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,41 +66,29 @@ oneOf:
- object
- string
not:
oneOf:
# - $ref: "schema.yaml" # Recursive references breaks SwaggerUI
- $ref: "reference.yaml"
$ref: "schema.yaml"
allOf:
type: array
items:
oneOf:
# - $ref: "schema.yaml" # Recursive references breaks SwaggerUI
- $ref: "reference.yaml"
$ref: "schema.yaml"
oneOf:
type: array
items:
oneOf:
# - $ref: "schema.yaml" # Recursive references breaks SwaggerUI
- $ref: "reference.yaml"
$ref: "schema.yaml"
anyOf:
type: array
items:
oneOf:
# - $ref: "schema.yaml" # Recursive references breaks SwaggerUI
- $ref: "reference.yaml"
$ref: "schema.yaml"
items:
oneOf:
# - $ref: "schema.yaml" # Recursive references breaks SwaggerUI
- $ref: "reference.yaml"
$ref: "schema.yaml"
properties:
type: object
properties: {}
additionalProperties:
oneOf:
# - $ref: "schema.yaml" # Recursive references breaks SwaggerUI
- $ref: "reference.yaml"
$ref: "schema.yaml"
additionalProperties:
oneOf:
# - $ref: "schema.yaml" # Recursive references breaks SwaggerUI
- $ref: "reference.yaml"
- $ref: "schema.yaml"
- type: boolean
default: true
description:
Expand Down
Loading