Swagger: operationId dupliqués #28

Closed parmentf opened this issue on 6 Mar 2023 - 0 comments

@parmentf parmentf commented on 6 Mar 2023

En bas à droite des pages OpenAPI, il y a un statut de validation.

Or, certaines ne sont pas vertes:

Pour biblio-tools, la page du validateur dit (il y a des identifiants en double, et un problème de schéma):

{
  "messages": [
    "attribute paths.'/v1/wos/fetch'(post).responses is missing",
    "attribute paths.'/v1/crossref/works/expand'(post).operationId is repeated",
    "attribute paths.'/v1/hal/works/expand'(post).operationId is repeated",
    "attribute paths.'/v1/istex/works/expand'(post).operationId is repeated"
  ],
  "schemaValidationMessages": [
    {
      "level": "error",
      "domain": "validation",
      "keyword": "required",
      "message": "object has missing required properties ([\"responses\"])",
      "schema": {
        "loadingURI": "#",
        "pointer": "/definitions/Operation"
      },
      "instance": {
        "pointer": "/paths/~1v1~1wos~1fetch/post"
      }
    }
  ]
}

Pour hal-classifier:

{
  "messages": [
    "attribute paths.'/v1/en/classhalen'(post).operationId is repeated"
  ],
  "schemaValidationMessages": []
}

Pour mapping-tools, c'est un autre problème:

{
  "messages": [
    "attribute paths.'/v1/apc/2018/apc-2018-doi'(post).responses is missing",
    "attribute paths.'/v1/apc/2018/cout-par-doi'(post).responses is missing"
  ],
  "schemaValidationMessages": [
    {
      "level": "error",
      "domain": "validation",
      "keyword": "oneOf",
      "message": "instance failed to match exactly one schema (matched 0 out of 2)",
      "schema": {
        "loadingURI": "#",
        "pointer": "/definitions/Components/properties/schemas/patternProperties/^[a-zA-Z0-9\\.\\-_]+$"
      },
      "instance": {
        "pointer": "/components/schemas/orcid"
      }
    }
  ]
}
@François Parmentier François Parmentier added a commit that referenced this issue on 6 Mar 2023
eefd69f fix: Fix swagger's duplicated operationId ...
@parmentf parmentf referenced the issue on 6 Mar 2023
@parmentf parmentf closed this issue on 6 Mar 2023
Labels

Priority
default
Milestone
No milestone
Assignee
No one
2 participants
@parmentf @François Parmentier