Skip to content

Unable to reference metaschema using $ref #1114

@jshbrntt

Description

@jshbrntt

Describe the bug
I have an OpenAPI specification that defines a API method which returns an object representing a JSON Schema Draft 7 definition.

openapi: 3.1.0

info:
  version: 1.0.0
  title: Service Config API

servers:
  - url: http://{base_url}/{env_id}
    variables:
      base_url:
        default: localhost:3000
        description: server
      env_id:
        default: v1
        description: path selector

paths:
  /service/{serviceId}/config/schema:
    get:
      parameters:
        - name: serviceId
          in: path
          description: ID of service
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: 'http://json-schema.org/draft-07/schema'

When I try to get a response from my API I get the following error.

{
  "message": "reference \"http://json-schema.org/draft-07/schema\" resolves to more than one schema"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions