Forum Discussion

fehguy's avatar
fehguy
Staff
9 years ago
Solved

Introducing SwaggerHub Domains

Hi, today we released Domains, which are reusable components for Swagger.  This allows you to leverage work in a central location, with versioning, publishing, and collaboration functionality.  Read all about it here:

 

https://swaggerhub.com/blog

 

And please post any questions you come up with!

  • Hi Ofir,

     

    Thanks for trying out the Domains feature.

     

    Referencing a component in a Domain is done using a full URL reference. The type of reference you used in your sample is not supported by the Swagger Specification itself.

     

    However, to make it easier, we've also introduced an auto-suggest feature that would type in the reference for you. This can be triggered with ctrl+space after the ref declaration.

     

    For a video demonstration, please check out https://youtu.be/6_oGhlj0ym0.

     

     

2 Replies

  • ofirmgr's avatar
    ofirmgr
    Occasional Visitor

    I coun't get Domain to work.

    this is the steps I did:

    • Created new domain
    • Added the following:
    parameters:
      skipParam:
        name: "skip"
        in: "query"
        description: "number of items to skip"
        type: "integer"
    • Go back to my API:
    • try add the following:
      get:
            parameters:
              $ref: 'skipParam'
            responses:
              200:
    • got:  Swagger Error

      The parameters needed to send a valid API call

    What am I doing wrong?

    • RonRatovsky's avatar
      RonRatovsky
      Moderator

      Hi Ofir,

       

      Thanks for trying out the Domains feature.

       

      Referencing a component in a Domain is done using a full URL reference. The type of reference you used in your sample is not supported by the Swagger Specification itself.

       

      However, to make it easier, we've also introduced an auto-suggest feature that would type in the reference for you. This can be triggered with ctrl+space after the ref declaration.

       

      For a video demonstration, please check out https://youtu.be/6_oGhlj0ym0.