Skip to content

Resolve JsonSchemas references with $id value pointers #1632

@irvinesunday

Description

@irvinesunday

Given this OpenAPI description with a JsonSchema reference with a pointer to its $id value, we need to resolve this successfully:

openapi: 3.1.0
info:
  title: Testbed
  version: 1.0.0
paths:
  /Input:
    get:
      parameters:
        - $ref: '#/components/parameters/size'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Input'
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: 'foo://bar/Input.thing'
      responses:
        '200':
          description: OK
components:
  parameters:
    size:
      name: size
      in: query
      required: true
      schema:
        type: integer
        format: int32
      patternProperties:
        ^[a-z]{3}$:
          type: string
  schemas:
    Input:
      $id: 'foo://bar/Input.thing'
      type: object
      properties:
        name:
          type: string
        age:
          type: integer

Metadata

Metadata

Assignees

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