Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Warning: Ignoring unexpected property "$ref" for @OA\Parameter() #2192

Open
cbrandolin opened this issue Jan 16, 2024 · 1 comment
Open

Comments

@cbrandolin
Copy link

for this definition the parameter generates an error

nelmio_api_doc:
  documentation:
    parameters:
      ejemploParam:
        name: exampleParam
        in: header
        description: Example parameter
        required: true
        schema:
          type: string
    openapi: 3.0.0
    info:
      title: api.com
      description: test
      contact:
        email: cbrandolin@akercontrol.com
      version: 1.0.0
    tags:
      - name: chofer
    servers:
      - url: https://127.0.0.1:8000
    paths:
      /api/chofer/login:
        get:
          tags:
            - chofer
          parameters: 
            - $ref: "#/parameters/ejemploParam"
          responses:
            "200":
              description: login ok
@DjordyKoert
Copy link
Collaborator

Does renaming $ref to ref fix the issue for you?

nelmio_api_doc:
  documentation:
    parameters:
      ejemploParam:
        name: exampleParam
        in: header
        description: Example parameter
        required: true
        schema:
          type: string
    openapi: 3.0.0
    info:
      title: api.com
      description: test
      contact:
        email: cbrandolin@akercontrol.com
      version: 1.0.0
    tags:
      - name: chofer
    servers:
      - url: https://127.0.0.1:8000
    paths:
      /api/chofer/login:
        get:
          tags:
            - chofer
          parameters: 
            - ref: "#/parameters/ejemploParam"
          responses:
            "200":
              description: login ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants