-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or request
Description
OpenAPI supports listing available servers via Server Objects. We could provide users a type-safe way of configuring their client toward e.g. a specific environment.
Given the following server objects:
[
{ "url": "https://dev.megacorp.evil/", "description": "Evil Development Server" },
{
"url": "[https://megacorp.evil/{format}](https://megacorp.evil/%7Bformat%7D)",
"description": "Evil Production Server",
"variables": {
"format": {
"default": "json",
"enum": [
"json",
"xml"
]
}
}
}
]Types could look like this:
type Server = `https://dev.megacorp.evil/` | `[https://megacorp.evil/${](https://megacorp.evil/$%7B)"json" | "xml"}`
export const getMegacorpAPI = (server: Server) => {
// ...
}Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request