Skip to content

OpenData is not a valid security scheme #48

@jorgenosberg

Description

@jorgenosberg

Some tooling and generators struggle with the current OpenData which is defined as a security scheme. This is because type: http + scheme: none is not a valid security definition.

To keep documenting intent and optionality without violating OpenAPI, I propose a tag-based approach:

/:
    get:
      security:
        - OpenData: []
      tags:
        - discovery
        - open-data
      operationId: landingPage
      summary: Landing page
      description: >-
        Gives a (technical & human readable) output describing how this API must
        be used. If  the parameter f=html is supplied, a human readable page
        must be responded.
      externalDocs:
        url: https://app.swaggerhub.com/apis/OGC/ogcapi-features-1-example-1/1.0.1
      parameters:
        - $ref: "#/components/parameters/f"
        - $ref: "#/components/parameters/acceptLanguage"
      responses:
        "200":
          $ref: "#/components/responses/landingPageResponse"
        default:
          $ref: "#/components/responses/errorResponse"

And then we define open-data with the necessary description:

tags:
  - name: open-data
    description: >
      Endpoints tagged as open-data may be made publicly accessible
      depending on the implementing party. Endpoints with no defined security scheme SHOULD be made publicly accessible, while endpoints
      tagged as open-data that have defined security schemes CAN be made publicly accessible if the implementing party wishes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec-bugErrors, contradictions, or missing definitions in the standard.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions