Forum Discussion

erikbullens's avatar
erikbullens
New Contributor
4 years ago

limit the servers in the serverlist in the API depending Consumers or designers

I have 2 servers in my  servers list . one that mocks the data  ( I mean virtserver.swaggerhub.com) and an other one which is

the development server of my API.

Now I want that only users that have the role of Designer can see the development server 

The consumer can only see the server that mocks the data. I want to limit the list because

not all cosumers may have access to the data.

Is this possible?

  • Unless you want to maintain 2 copies of the contract there is no way, today, to mask parts of the spec. 

    The OAI/OAS is looking into something called overlays, but there is nothing solid published on this yet. 

    If your live endpoint requires authentication, that might be a temporary “block” to consumers who do not have permission to use that endpoint.