Forum Discussion

tobyclements's avatar
tobyclements
New Contributor
2 years ago
Solved

Referencing path parameters declared in Domains

Hi,

I can't seem to resolve an error in the SwaggerHub UI.

 

I have a parameter declared in a domain:

parameters:
  someParameter:
     name: someParameter
     description: a parameter
     in: path
     required: true
     schema:
        type: string

and I reference it in an API definition:

/path/{someParameter}:
    parameters:
      - $ref: 'https://api.swaggerhub.com/domains/mydomain/1.0.0#/components/parameters/someParameter'

But I cannot resolve the error:

"Declared path parameter 'someParameter' needs to be defined as a path parameter at either path or operation level"

The documentation renders perfectly and if I move the parameter definition into the API definition and reference it locally the error disappears.

Is this just a bug in the UI or am I missing some detail?

 

Thanks

  • Update: After saving, closing the browser and reopening the page, the error has gone. This may just be a UI bug. Apologies. I'll leave this thread open for a day or two just in case someone knows something but I suspect I can close it.

4 Replies

  • Update: After saving, closing the browser and reopening the page, the error has gone. This may just be a UI bug. Apologies. I'll leave this thread open for a day or two just in case someone knows something but I suspect I can close it.

  • brunoS's avatar
    brunoS
    New Contributor

     I recently encountered the same problem , but closing the browser (firefox) or trying with chrome doesn't change the issue.

    • KJans's avatar
      KJans
      Staff

      brunoS If you keep having this message, talk to our support people at https://support.smartbear.com/swaggerhub/message/

      • brunoS's avatar
        brunoS
        New Contributor

        Thanks Kjans, it's been fixed meanwhile.