Skip to content
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

Clarify POST /connection response #251

Open
sajith opened this issue Apr 11, 2024 · 0 comments
Open

Clarify POST /connection response #251

sajith opened this issue Apr 11, 2024 · 0 comments
Assignees

Comments

@sajith
Copy link
Member

sajith commented Apr 11, 2024

While working on #225, I came across this:

requestBody:
description: order placed for creating a connection
content:
application/json:
schema:
$ref: '#/components/schemas/connection'
required: true
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/connection'

It appears that both POST /connection request body and the response are supposed to follow #/components/schemas/connection schema. We have not been doing that in the responses so far anyway: we've just been returning 200 success messages without a full JSON body that follows the schema. (And even if we do it right now, we won't be really honest about things like timestamp, start_time, end_time, etc.)

This is probably worth reconsidering, and I'm creating this issue as a reminder to ourselves.

If we care about this, we probably can turn on strict validation of requests and responses (with connexion.App(strict_validation=True, validate_responses=True).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant