Skip to content

A micro-service to validate SpaceAPI endpoints.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

SpaceApi/validator

Repository files navigation

Validation server for SpaceAPI endpoints

OpenAPI spec: https://validator.spaceapi.io/openapi.json

CircleCI Docker Image Go Report Card

API

There are two main endpoints, to validate raw JSON and to validate URLs:

The full API specification in OpenAPI format can be found at https://validator.spaceapi.io/openapi.json.

Validating URLs

Use this if your endpoint is already online.

Example (curl):

curl -X POST -H "Content-Type: application/json" \
    https://validator.spaceapi.io/v2/validateURL \
    -d'{"url": "https://status.crdmp.ch/"}'

Example (httpie):

http post \
    https://validator.spaceapi.io/v2/validateURL \
    url=https://status.crdmp.ch/

Response:

{
    "valid": true,
    "message": "",
    "isHttps": true,
    "httpsForward": false,
    "reachable": true,
    "cors": true,
    "contentType": true,
    "certValid": true,
    "validatedJson": { … },
    "schemaErrors": [ … ]
}

Validating JSON

If you want to validate JSON data directly, use this endpoint. However, in contrast to the URL endpoint, only the content will be validated, but not the server configuration (e.g. whether CORS is set up properly or whether a valid certificate is being used).

Example (curl):

curl -X POST -H "Content-Type: application/json" \
    https://validator.spaceapi.io/v2/validateJSON \
    -d @mydata.json

Example (httpie):

cat mydata.json | http post https://validator.spaceapi.io/v2/validateJSON

Response:

{
    "message": "",
    "valid": true,
    "validatedJson": { … },
    "schemaErrors": [ … ]
}

Dev setup

See DEVELOPMENT.md.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

A micro-service to validate SpaceAPI endpoints.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published