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

we need a JSON schema definition for DRS API available at a public, stable URL #346

Open
briandoconnor opened this issue Mar 3, 2021 · 3 comments

Comments

@briandoconnor
Copy link
Contributor

Essentially a JSON schema version of this:

JSON schema: https://github.com/ga4gh/data-repository-service-schemas/blob/drs-1.1.0/openapi/data_repository_service.swagger.yaml

at a versioned URL and also a "latest" URL

Look at making w3id.org permalink

@stain
Copy link

stain commented Mar 3, 2021

+1 - w3id permalinks are quite straight forward and can even be made with regular expressions to pass over the version.

The permalink should redirect probably to https://raw.githubusercontent.com/ga4gh/data-repository-service-schemas/drs-1.1.0/openapi/data_repository_service.swagger.yaml or github.io equivalent so the JSON Schema is resolvable directly.

@briandoconnor
Copy link
Contributor Author

@stain
Copy link

stain commented Mar 3, 2021

Example from IEEE 2791 (BioCompute Object)

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://w3id.org/ieee/ieee-2791-schema/error_domain.json",
    "type": "object",
    "title": "Error Domain",
    "description": "Fields in the Error Domain are open-ended and not restricted nor defined by the IEEE-2791 standard. It is RECOMMENDED that the keys directly under empirical_error and algorithmic_error use a full URI. Resolving the URI SHOULD give a JSON Schema or textual definition of the field. Other keys are not allowed error_domain",
    "additionalProperties": false,
    "required": [
        "empirical_error",
        "algorithmic_error"
    ],
    "properties": {
        "empirical_error": {
            "type": "object",
            "title": "Empirical Error",
            "description": "empirically determined values such as limits of detectability, false positives, false negatives, statistical confidence of outcomes, etc. This can be measured by running the algorithm on multiple data samples of the usability domain or through the use of carefully designed in-silico data."
        },
        "algorithmic_error": {
            "type": "object",
            "title": "Algorithmic Error",
            "description": "descriptive of errors that originate by fuzziness of the algorithms, driven by stochastic processes, in dynamically parallelized multi-threaded executions, or in machine learning methodologies where the state of the machine can affect the outcome."
        }
    }
}

Note unlike that standard I agree with @briandoconnor that the version number should be baked in to the permalink (or at least major.minor part of it) because it's a reference to a particular JSON Schema definition, not the generic type (which should also have permalink referred to from the schema)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants