OpenAPI - Distinguish between stored procedure parameters and result set columns#1551
OpenAPI - Distinguish between stored procedure parameters and result set columns#1551seantleonard merged 18 commits intomainfrom
Conversation
…arameters and result set columns for the request and response payloads.
…n. update package versions, and add tsql storedprocedure creation for use in tests.
Aniruddh25
left a comment
There was a problem hiding this comment.
Looks good! Left few minor suggestions.
|
you mentioned in PR description that |
…sserts the necessary characteristics of a request and response body . updates comments.
Request bodies in those two request types are not convention per HTTP spec:
Relevant text with my annotation in square brackets:
|
…cenarios under test: validating input parameters and json data types and output result set columns and their json data types. Removes new SP's added from the .sql deploy file.
Co-authored-by: Aniruddh Munde <[email protected]>
…pace collision/errors.
|
Nit: The comment here: is repeated at line 178. |
|
It might not be relevant for this PR but I think we default stored procedures to atleast support POST operation if no method is defined. This doesn't seem to be the case here: |
Good catch. The sp default methods are added (POST) when |
Why make this change?
What is this change?
How was this tested?
OpenAPI document example
An example OpenAPI document which helps visualize how the parsing works. Irrelevant fields were removed.
{ "openapi": "3.0.1", "paths": { "/sp1": { "get": {"..."}, "post": { "tags": [ "sp1" ], "description": "Executes a stored procedure.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/sp1_sp_request" } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/sp1_sp_response" } } } } } } }, "400": { "description": "BadRequest" } } } } }, "components": { "schemas": { "sp1_sp_request": { "type": "object", "properties": { "inputName": { "type": "string", "format": "" } } }, "sp1_sp_response": { "type": "object", "properties": { "outputName": { "type": "string", "format": "" } } } } } }