Joost Farla - j.farla@geonovum.nl
Dimitri van Hees - d.vanhees@geonovum.nl
contact-properties: severity: error # of "warn", "info", "hint" given: $.info.contact then: - field: name function: truthy - field: url function: truthy - field: email function: truthy message: Contact object must have "name", "url", and "email". documentationUrl: https://developer.overhe...
npm install -g @stoplight/spectral-cli spectral lint -r https://static.developer.overheid.nl/adr/ruleset.yaml $OAS_URL_OR_FILE
# Install the extension from the vscode marketplace $ code --install-extension stoplight.spectral # Download the ruleset to your project home $ curl -L https://static.developer.overheid.nl/adr/ruleset.yaml > .spectral.yml # Run the IDE $ code
GitLab:
spectral-lint: image: node:20 stage: spectral_lint script: - npm install -g @stoplight/spectral-cli - curl -L https://static.developer.overheid.nl/adr/ruleset.yaml > .spectral.yml - spectral lint -r .spectral.yml $OAS_URL_OR_FILE rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' when: always - when: manual
Remote (JSON-)schema
Schema compatibility check
Request parameter validatie
{ "title": "3D Basisvoorziening", "links": [ { "rel": "service-desc", "type": "application/vnd.oai.openapi+json;version=3.0", "title": "The JSON OpenAPI 3.0 document that describes the API offered at this endpoint", "href": "https://api.pdok.nl/kadaster/3d-basisvoorziening/ogc/v1/api" }, { "rel": "conformance", "type": "application/json", "title": "OGC API conformance classes implemented by the API offered at this endpoint", "href": "https://api.pdok.nl/kadaster/3d-basisvoorziening/ogc/v1/conformance" } ] }
Bron (PDOK): https://api.pdok.nl/kadaster/3d-basisvoorziening/ogc/v1/
{ "conformsTo": [ "http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/core", "http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/json", "http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/html", "http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/oas30", "http://www.opengis.net/spec/ogcapi-common-2/1.0/conf/collections", "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core", "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html", "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson", "http://www.opengis.net/spec/ogcapi-features-2/1.0/conf/crs", "http://www.opengis.net/spec/ogcapi-features-5/1.0/conf/schemas", "http://www.opengis.net/spec/ogcapi-features-5/1.0/conf/core-roles-features", "http://www.opengis.net/spec/ogcapi-features-5/1.0/conf/returnables-and-receivables", "http://www.opengis.net/spec/json-fg-1/0.2", "http://www.opengis.net/spec/ogcapi-geovolumes-1/1.0/conf/core" ] }
Bron (PDOK): https://api.pdok.nl/kadaster/3d-basisvoorziening/ogc/v1/conformance
Link
{ "content": { "application/geo+json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/featureGeoJSON" }, { "$ref": "#/components/schemas/recordGeoJSON" } ] } } } }
Links:
https://github.com/geonovum-labs/ogc-checker
https://github.com/developer-overheid-nl/oas-checker
https://github.com/developer-overheid-nl/oas-generator
https://github.com/developer-overheid-nl/publiccode-checker
- checkers obv spectral - wat is spectral
demo!
Benoemen ADR discussie