oaspect server API
- Endpoints
- 2
- Groups
- 1
- Models
- 4
The request contract of oaspect/server's handlers, as an OpenAPI document rendered by oaspect itself. For installation, configuration and guides, read the documentation.
Server helpers
Web-standard Request → Response handlers from oaspect/server.
Relay a "Try" request
/proxyoperationId: proxy
What the viewer posts to proxyUrl. createProxyHandler({ allowedHosts }) sends the request from the server and returns the response.
Request body
requiredText body (JSON
multipart/form-data parts; files are base64-encoded.
Responses
Milliseconds.
Serve the OpenAPI document
/openapioperationId: spec
createSpecHandler({ url, fallback }): fetches the live document server-side and caches it; serves the fallback when it cannot be reached.
Responses
Headers
remote, fallback (the viewer shows an out-of-date notice) or static.
Models
ProxyRequest
Text body (JSON
multipart/form-data parts; files are base64-encoded.
FormPart
ProxyResponse
Milliseconds.