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).
While working on #225, I came across this:
https://github.com/atlanticwave-sdx/sdx-controller/blob/81df8477750d64f6b1a8be44495ea5ef435b1c72/sdx_controller/swagger/swagger.yaml#L143-L156
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 liketimestamp
,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)
.