Skip to content

References are not resolved according to RFC3986 #272

Open
0 of 1 issue completed
Open
Feature
0 of 1 issue completed
@hiddewie

Description

@hiddewie

See the specification here: https://swagger.io/docs/specification/using-ref/.
This points to RFC3986 (https://tools.ietf.org/html/rfc3986) for the structure of JSON references. This RFC is not supported in openapi-diff.

I made an example of a valid reference according to OpenAPI 3, for which OpenAPI diff throws an error. See #271

Example content:

openapi: 3.0.1
info:
  title: Service
  description: test
  version: test
  contact:
    name: test
    url: 'test'
servers:
  - url: 'localhost'
paths:
  /feature:
    get:
      summary: Get feature state
      operationId: feature
      description: Gets feature
      parameters:
        - name: feature
          in: query
          schema:
            $ref: '#/components/schemas/Feature/properties/feature'    # <---- this
          required: true
      responses:
        '200':
          description: Found feature
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feature'
components:
  schemas:
    Feature:
      type: object
      properties:
        feature:
          type: string
          enum:
            - alpha
            - beta
        value:
          type: boolean
      required:
        - feature
        - value

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions