- 
                Notifications
    You must be signed in to change notification settings 
- Fork 270
Closed
Description
Given an input of this
openapi: 3.1.0
info:
  title: Simple API
  version: 1.0.0
paths:
  /box:
    get:
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: https://foo.bar/Box
  /circle:
    get:
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: https://foo.bar/Circle
components:
  schemas:
    Box:
      $id: https://foo.bar/Box
      type: object
      properties:
        width:
          type: number
        height:
          type: number
    Circle:
      $id: https://foo.bar/Circle
      type: object
      properties:
        radius:
          type: number
is written out as
openapi: '3.1.0'
info:
  title: Simple API
  version: 1.0.0
paths:
  /box:
    get:
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/https://foo.bar/Box'
  /circle:
    get:
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/https://foo.bar/Circle'
components:
  schemas:
    Box:
      $id: https://foo.bar/Box
      type: object
      properties:
        width:
          type: number
        height:
          type: number
    Circle:
      $id: https://foo.bar/Circle
      type: object
      properties:
        radius:
          type: numberThe $ref values should just be the uri
Metadata
Metadata
Assignees
Labels
No labels