Closed italovalcy closed 2 months ago
Do we need to update the part where the encoder.py handles the JSON request?
Do we need to update the part where the encoder.py handles the JSON request?
I realized that internal _id attribute was actually useful for other parts of the code. I'm reviewing the approach now to make sure it will not break compatibility.
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
sdx_controller/handlers/connection_handler.py | 0 | 1 | 0.0% | ||
<!-- | Total: | 3 | 4 | 75.0% | --> |
Totals | |
---|---|
Change from base Build 8756604524: | 0.1% |
Covered Lines: | 710 |
Relevant Lines: | 1422 |
Fixes #260 Fixes #34
Description of the change
_id
. That issue could be fixed by changing the Encoder to handle ObjectID as a string (as suggested here). However, after analyzing the full picture I understood it was better to remove that field from the response to the user and return only the actual connection datagetconnection_by_id
with validation for connections not found, to make it comply with the swagger spec (https://github.com/atlanticwave-sdx/sdx-controller/blob/main/sdx_controller/swagger/swagger.yaml#L189-L190)