Skip to content

'X-foo' Parameter Object Error #3313

@megan-levy-kr

Description

@megan-levy-kr

Q&A (please complete the following information)

  • OS: macOS
  • Browser: Chrome
  • Version: 103.0.5060.114 (Official Build) (x86_64)
  • Method of installation: web browser
  • Swagger-Editor version: Current version on https://editor.swagger.io/
  • Swagger/OpenAPI version: OpenAPI 3.0

Content & configuration

The following image shows the online Swagger editor for an error that previously did not occur
swagger_io_error_message

Example Swagger/OpenAPI definition:

openapi: 3.0.1
info:
  title: "Sample Doc"
  version: 1.6.2
security:
  - clientContext:
      - "todo:write"
paths:
  /todo/v1/owners:
    parameters:
      - $ref: "#/components/parameters/x-correlation-id"
    get:
      tags:
        - "Owners"
      summary: "Get owners"
      responses:
        200:
          description: "OK"
  
components:
  securitySchemes:
    clientContext:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: "www.example.com/token"
          scopes:
            todo:write: Provides read and write access
  parameters:
    x-correlation-id:
      in: "header"
      name: "X-Correlation-ID "
      description: "Used to enable tracing through the call stack."
      schema:
        type: "string"
        format: "uuid"
        example: "2db833ca-d336-4eac-8ef8-b136233f6b3f"
    
?yourQueryStringConfig

Describe the bug you're encountering

x-correlation-id is now being flagged as an error whereas previously the 'x-' was acceptable for the parameter object name

To reproduce...

Steps to reproduce the behavior:

  1. Go to editor.swagger.io
  2. paste example doc
  3. see line 11 for error

Expected behavior

The parameter object should accept 'x-correlation-id'

Additional context or thoughts

Please let me know if theres any further information needed!!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions