Skip to content

Remove TRAPI-specific content and references to missing endpoints from the OpenAPI document #36

Description

@gaurav

NodeNorm ES has never had NodeNorm Redis's TRAPI endpoints (/query and /asyncquery), but its OpenAPI document, src/nodenorm/webapp/openapi.json, still carries everything that went with them. It was copied from NodeNorm Redis, and none of the TRAPI content applies here, so it can all be removed. This issue also covers the other parts of the document that describe endpoints this service doesn't have.

TRAPI-specific content to remove

  • The info.x-trapi block (version: 1.5.0, operations: [annotate_nodes]). It advertises a TRAPI interface this service doesn't implement. This is the "Doesn't actually support TRAPI 1.5.0" item in Update the OpenAPI information #35.
  • 145 of the 151 schemas in components.schemas. No path references them. Only CurieList, SemanticTypes, SetIDQuery, SetIDResponse, HTTPValidationError and ValidationError are reachable from paths. The rest are TRAPI models (Message, KnowledgeGraph, Analysis, FilterKgraphTopNParameters, the Hashable* wrappers, and so on).

Other out-of-date parts

  • /get_curie_prefixes. info.description tells readers to "check ... /get_curie_prefixes", but it returns 404 here. handlers/curie_prefix.py exists but isn't registered in build_handlers(). It also looks like an unfinished copy of the semantic-types handler: its class is named SemanticTypeHandler, and it returns semantic types rather than prefix counts. Either implement and register the endpoint, or delete the file and remove it from the description.
  • /version. It's registered and served, but it isn't in the OpenAPI document, and /status already reports the same version. Either document it or remove it.

How to check

TranslatorSRI/babel-validation's test_openapi_json validates each deployment's published document. It currently fails on nodenorm-es.ci and nodenorm-es.test with the max_edges error above, and should pass once the unused schemas are gone.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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