Skip to content

Commit

Permalink
Merge pull request #371 from crim-ca/fix-schema-recursive
Browse files Browse the repository at this point in the history
fix schema recursive references
  • Loading branch information
bpross-52n authored Mar 4, 2024
2 parents c04b2e2 + 4345283 commit 3eb6764
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 154 deletions.
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

0 comments on commit 3eb6764

Please sign in to comment.