Skip to content

Commit

Permalink
Patch validation errors using @redocly/cli for validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
pvretano committed Nov 5, 2024
1 parent 51c1295 commit 8b10451
Show file tree
Hide file tree
Showing 12 changed files with 153 additions and 56 deletions.
63 changes: 39 additions & 24 deletions core/openapi/ogcapi-records-1-building-blocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ components:
items:
type: string
pattern: "^((?:(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?:([A-Za-z]{2,3}(-(?:[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?:[A-Za-z]{4}))?(-(?:[A-Za-z]{2}|[0-9]{3}))?(-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?:[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?:x(-[A-Za-z0-9]{1,8})+))?)|(?:x(-[A-Za-z0-9]{1,8})+))(?:;q=(?:1|1\\.0+|0|0\\.[0-9]+))?$"
examples:
- "de;q=0.7"
example:
- "de;q=0.7"
explode: false
style: form
q:
Expand Down Expand Up @@ -166,7 +166,7 @@ components:
- record
- catalog
type:
descripton:
description:
Fixed to catalog for collections of records
and/or subordinate catalogs.
type: string
Expand Down Expand Up @@ -257,7 +257,7 @@ components:
type: string
description: The value is the phone number itself.
pattern: "^\\+[1-9]{1}[0-9]{3,14}$"
examples:
example:
- "+14165550142"
roles:
description:
Expand Down Expand Up @@ -318,7 +318,7 @@ components:
hoursOfService:
type: string
description: Time period when the contact can be contacted.
examples:
example:
- "Hours: Mo-Fr 10am-7pm Sa 10am-22pm Su 10am-21pm"
contactInstructions:
type: string
Expand Down Expand Up @@ -371,21 +371,21 @@ components:
type: string
description:
The language tag as per RFC-5646.
examples:
example:
- "el"
name:
type: string
minLength: 1
description:
The untranslated name of the language.
examples:
example:
- "Ελληνικά"
alternate:
type: string
description:
The name of the language in another well-understood language,
usually English.
examples:
example:
- "Greek"
dir:
type: string
Expand Down Expand Up @@ -426,26 +426,30 @@ components:
rel:
type: string
description: The type or semantics of the relation.
example: "alternate"
example:
- "alternate"
type:
type: string
description:
A hint indicating what the media type of the
result of dereferencing the link should be.
example: "application/geo+json"
example:
- "application/geo+json"
hreflang:
type: string
description:
A hint indicating what the language of the
result of dereferencing the link should be.
example: "en"
example:
- "en"
title:
type: string
description:
Used to label the destination of a link
such that it can be used as a human-readable
identifier.
example: "Trierer Strasse 70, 53115 Bonn"
example:
- "Trierer Strasse 70, 53115 Bonn"
length:
type: integer
created:
Expand All @@ -472,7 +476,8 @@ components:
description:
Supplies a resolvable URI to a remote resource
(or resource fragment).
example: "http://data.example.com/buildings/(building-id}"
example:
- "http://data.example.com/buildings/(building-id}"
varBase:
type: string
description:
Expand Down Expand Up @@ -749,7 +754,7 @@ components:
description:
Minimum time period resolvable in the dataset, as an
ISO 8601 duration.
examples:
example:
- "P1D"
exception:
type: object
Expand Down Expand Up @@ -783,23 +788,23 @@ components:
id:
description: identifier of the collection used, for example, in URIs
type: string
examples:
- address
example:
- "address"
title:
description: human readable title of the collection
type: string
examples:
- address
example:
- "address"
description:
description: a description of the features in the collection
type: string
examples:
- An address.
example:
- "An address."
links:
type: array
items:
$ref: '#/components/schemas/link'
examples:
example:
- href: http://data.example.com/buildings
rel: item
- href: http://example.com/concepts/buildings.html
Expand All @@ -818,7 +823,7 @@ components:
type: string
default:
- http://www.opengis.net/def/crs/OGC/1.3/CRS84
examples:
example:
- http://www.opengis.net/def/crs/OGC/1.3/CRS84
- http://www.opengis.net/def/crs/EPSG/0/4326
extent:
Expand Down Expand Up @@ -901,7 +906,7 @@ components:
maxItems: 6
items:
type: number
examples:
example:
- - -180
- -90
- 180
Expand Down Expand Up @@ -955,7 +960,7 @@ components:
type: string
format: date-time
nullable: true
examples:
example:
- '2011-11-11T12:22:11Z'
- null
trs:
Expand Down Expand Up @@ -1333,6 +1338,16 @@ components:
text/html:
schema:
type: string
BadRequest:
description:
A server error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/exception'
text/html:
schema:
type: string
ServerError:
description:
A server error occurred.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ paths:
responses:
'200':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/LandingPage'
'500':
'4XX':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/BadRequest'
'406':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/NotAcceptable'
'5XX':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
'/conformance':
get:
Expand All @@ -76,7 +80,11 @@ paths:
responses:
'200':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ConformanceDeclaration'
'500':
'4XX':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/BadRequest'
'406':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/NotAcceptable'
'5XX':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
'/collections':
get:
Expand All @@ -89,7 +97,11 @@ paths:
responses:
'200':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/Catalogs'
'500':
'4XX':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/BadRequest'
'406':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/NotAcceptable'
'5XX':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
'/collections/{catalogId}':
get:
Expand All @@ -106,9 +118,13 @@ paths:
responses:
'200':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/Catalog'
'4XX':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/BadRequest'
'404':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/NotFound'
'500':
'406':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/NotAcceptable'
'5XX':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
'/collections/{catalogId}/sortables':
get:
Expand All @@ -125,9 +141,13 @@ paths:
responses:
'200':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/Sortables'
'4XX':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/BadRequest'
'404':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/NotFound'
'500':
'406':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/NotAcceptable'
'5XX':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
'/collections/{catalogId}/items':
get:
Expand Down Expand Up @@ -156,11 +176,13 @@ paths:
responses:
'200':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/Records'
'400':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/InvalidParameter'
'4XX':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/BadRequest'
'404':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/NotFound'
'500':
'406':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/NotAcceptable'
'5XX':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
'/collections/{catalogId}/items/{recordId}':
get:
Expand All @@ -179,7 +201,18 @@ paths:
responses:
'200':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/Record'
'4XX':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/BadRequest'
'404':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/NotFound'
'500':
'406':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/NotAcceptable'
'5XX':
$ref: 'ogcapi-records-1-building-blocks.yaml#/components/responses/ServerError'
components:
securitySchemes:
openIdConnect:
type: "openIdConnect"
openIdConnectUrl: "https://accounts.google.com/.well-known/openid-configuration"
security:
- openIdConnect: []
Loading

0 comments on commit 8b10451

Please sign in to comment.