anvilproject / client-apis

Clients for Python, R, javascript that interact with [terra, gen3, galaxy, others]
Apache License 2.0
9 stars 5 forks source link

duplicate operationIds and response values. #8

Closed bwalsh closed 3 years ago

bwalsh commented 5 years ago

From @mtmorgan comments on PR #6

Should the terra api itself be part of the combined API?

There are obvious issues, e.g., duplicate operationIds

$ grep operationId api.yml |sort|wc -l
     238
$ grep operationId api.yml |sort|uniq | wc -l
     202

and (mildly) conflicting response values


$ grep -A 1 401 api.yml
        '401':
          description: The request is unauthorized.
--
        '401':
          description: The request is unauthorized.
--
        '401':
          description: unauthorized request
--
        '401':
          description: unauthorized request
--
        '401':
          description: Proxy connection unauthorized
--
        '401':
          description: Proxy connection unauthorized
--
        '401':
          description: Credentials not provided or incorrect

but presumably merging the APIs here is a step to resolving those.

Should these be introduced as (failing) tests?

bwalsh commented 5 years ago

per

open-api (3.0)

operationId is an optional unique string used to identify an operation. If provided, these IDs must be unique among all operations described in your API.

Some common use cases for operationId are:

Some code generators use this value to name the corresponding methods in code.
Links can refer to the linked operations by operationId.

This reference seems definitive:

Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is recommended to follow common programming naming conventions.

swagger (2.0)

Each operation may specify a unique operationId. Some code generators use this value to name the corresponding methods in code.