Forum Discussion

jmalin's avatar
jmalin
New Contributor
6 years ago

Use external files as $ref targets in SwaggerHub

I'm trying to figure out how to store and refer to external files in SwaggerHub using $ref.

 

I'm still using a "free" account while I evaluate the product. This may limit my options.

 

Here are my issues:

  1. I don't see any way to upload a file containing OAS3 YAML so that my API definition could be aware of it.
  2. I can't tell how to write the parameter to the $ref: key so that it refers to another file.
  3. I don't know which OAS3 objects can use external references
  4. I don't know how to format the external file. In an internal reference, all I have to do is point to the object (for example components/schemas and the name of the object, for example myProperty. I don't know what has to be in the external file.

3 Replies

    • jmalin's avatar
      jmalin
      New Contributor

      Domains aren't supported for OAS3, so I'll have to continue embedding my definitions in the main YAML file. When will domains be supported for OAS3?

      • MarcusJ's avatar
        MarcusJ
        Moderator

        Hi,

         

        I can't give an exact time frame for OAS3 support for domains, but the development team is working on implementing this.

         

        Regards,

        Marcus

        SmartBear Support