Skip to content

Proposal: lightweight complement to direct submission to SmartAPI #2

Open
@cmungall

Description

@cmungall

I propose a system that leverages SmartAPI but overcomes some of the difficulties some have had with registering (difficulty aligning allowed fields, smartAPI is very particular about what fields are allowed in the swagger.json see SmartAPI/smartapi_registry#1, difficulties with swagger.json generated directly from programmatic annotations e.g. flask, difficulties with non-RPC style APIs).

In this repo, in a directory called registry, we have a yaml file per API. The spec for this is TBD, but it would minimally include

  • a short unique name
  • a URL for the endpoint
  • a URL for endpoint metadata (i.e. swagger.json for OpenAPI v2/3; graphql schema)
  • the typo of API / framework (e.g OpenAPI, GraphQL, SPARQL endpoint, even open SQL port)
  • a brief textual description
  • github name of contact person
  • github repo for source of API

The goal is to encourage metadata directly within the API endpoint in a standard way, but to have some minimal subset useful for basic indexing.

It would then be fairly simple to have a CI job that sweeps this repo and attempts to register the API with SmartAPI (unless there is a tag in the yaml that says not to do this, e.g. if manual registration is preferred). It would produce collected error reports for any that could not be registered. This would be useful to SmartAPI developers to pinpoint pain points. But crucially, we would still have the API registered and visible to all project members even if the checks fail.

This pull mechanism is very similar to what we developed for registering ontologies on http://obofoundry.org, it's lightweight and has the advantage of tracking everything in github. Anyone is free to make PRs on any of the registry entries, but only members of this repo with permissions would be able to merge these.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions