HTTP Options Response Body #33
-
The Standards for Request & Response state that:
RFC 2626 states that:
It later goes on to say:
With this, I often use The response body is the OpenAPI specification for that specific Request Model (Serializations), Request information, and Response Model (Serializations). This way my SDKs can programmatically retrieve information about that specific resource. Then, these are all collated up to the root directory which provides a fully qualified OpenAPI specification for the entire platform and is browse-able in Swagger (or other UI). I'm curious why the standard would say MUST NOT contain a response body? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
@nateklaiber In this case I would focus on this part of the spec
The example you provided uses It's a clever idea, but I would encourage a well-known endpoint as opposed to a solution like this. For example the swagger integration with .net via Swashbuckle provides a |
Beta Was this translation helpful? Give feedback.
@nateklaiber In this case I would focus on this part of the spec
The example you provided uses
OPTIONS
to provide data not specifically related to "communication options" (e.g.: accepted verbs, CORS, expirations, and the like) but rather as an SDK documentation resource.It's a clever idea, but I would encourage a well-known endpoint as opposed to a solution like this. For example the swagger integration with .net via Swashbuckle provides a
/swagger
endpoint and the ruby gem rswag provides/api-docs
as a browsable resource useful both programmatically and for end users.