You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional context
According to my understanding, the tool doesn't recognize some methods as GET, PATCH and DELETE. Even if they actually are GET, PATCH and DELETE. I suppose the reason is that in the TI API, we defined "parameters" as child of "paths" rather than child of the "methods". Our implementation is correct according to the OpenAPI Specifications (https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#path-item-object). We have used the "parameters" description as child of "path". With our solution we avoid duplicating the parameter definition for the different methods (Get, Patch and Delete). With the suggested approach we should define the same parameter three times in the code with the risk of code misalignment.
Thank you @FabrizioMoggio for pointing this out with detailed context.
The rule "camara-http-methods" should be corrected with "parameters" field in the Path Item object.
Problem description
Using Spectral over the TI API a non correct error is returned.
camaraproject/EdgeCloud#191 (comment)
Expected action
Correction of: https://github.com/camaraproject/Commonalities/blob/main/artifacts/linting_rules/.spectral.yml.
Section starting on raw 103: "camara-http-methods:"
Additional context
According to my understanding, the tool doesn't recognize some methods as GET, PATCH and DELETE. Even if they actually are GET, PATCH and DELETE. I suppose the reason is that in the TI API, we defined "parameters" as child of "paths" rather than child of the "methods". Our implementation is correct according to the OpenAPI Specifications (https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#path-item-object). We have used the "parameters" description as child of "path". With our solution we avoid duplicating the parameter definition for the different methods (Get, Patch and Delete). With the suggested approach we should define the same parameter three times in the code with the risk of code misalignment.
Reference in the TI API: raw 2012
https://github.com/camaraproject/EdgeCloud/blob/32c7ca4faf54fc14fa510c1212f34a0f43a42bfd/code/API_definitions/Traffic%20Influence/Traffic_Influence.yaml
The text was updated successfully, but these errors were encountered: