Skip to content

Add support for different execution environment, e.g. sandbox #641

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

Closed
IvanGoncharov opened this issue Apr 9, 2016 · 4 comments
Closed

Comments

@IvanGoncharov
Copy link
Contributor

Many APIs have multiple environments for execution of the same calls.
Examples are sandbox, geographical locations(to minimise latency), different instances of the same service, etc.

Currently, it impossible to describe multiple environments in the same document but @fehguy proposal from #640 to add array of hosts to spec:

 hosts:
   - scheme: http
     host: foo.com
     port: 8080
     basePath: /bar
   - scheme: https
     host: foo.com
     port: 8443
     basePath: /baz

It seems like good solution for this problem, but it missing few essential details:

  • title field
  • description field
  • some mechanism to mark default host
@webron
Copy link
Member

webron commented Apr 11, 2016

I assume both title and description would be optional.

@IvanGoncharov
Copy link
Contributor Author

@webron Yes, definitely. It would be really strange to produce different titles for HTTP and HTTPS hosts.

@IvanGoncharov
Copy link
Contributor Author

@webron I also think if you introduce support for multiple hosts you need to support marking default.
Previously it was choose between HTTP and HTTPS so it was done by tools automatically.
Simplest possible solution would be to add default property to elements of hosts.
I see only one problem with it: JSON Schema can't validate that it set to true for a single host.

I also think one host SHOULD be marked as default.

@webron
Copy link
Member

webron commented Apr 12, 2016

JSON Schema constraints shouldn't dictate the spec. JSON Schema cannot and will not be able to fully validate the spec anyways, so it's a non-issue.

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