-
Notifications
You must be signed in to change notification settings - Fork 60
Update API-design-guidelines.md #96
Update API-design-guidelines.md #96
Conversation
RubenBG7
commented
Oct 19, 2022
- Added versioning control of rest parts involved in Apification projects.
- X-Correlator architecture header changed to optional from required
- Added versioning control of rest parts involved in Apification projects. - X-Correlator architecture header changed to optional from required
@RubenBG7 : Thanks for extending the versioning section as discussed. Could you kindly update the PR so that the approved merge would add your doc directly to the documentation directory rather than the working directory? |
Hi, could we consider if we need to stipulate if the API's should use camel case, spinal case, other formatting for the uri's ? I think as we're creating a suite of 8 API's some consistency would be useful for resource names, dates and parameters. I was thinking something like the following: [https://api.gov.au/sections/naming-conventions.html#:~:text=Query%20Parameter%20Names,-Literals%2Fexpressions%20in&text=Query%20parameters%20MUST%20start%20with,that%20are%20not%20URL%20safe.] |
I would like to understand if there is any specific reason to not exploring standard error response code that described in IETF RFC 7807. It seems , there is no direct correlation between section 3.2(HTTP Response Codes) and section 6 (Error Response). |
If we are referring “ Response body validation” under section 10.2 (Security implementation), are we considering OAS validation (OpenAPI Specification Validation) |
Under section 8.1 (Pagination), we are referring different query parameter for fetching records like “per_page” and “page” instead of standard “Offset” and “Limit” respectively (recommended by TMForum). As we generally use keywords “Limit” and “Offset” while fetching records from the database so would recommend the same naming convention so that it can be mapped directly. SELECT |
I would also recommend that Names in Paths URI (tasks, individual resources, etc.) MUST be camel case or lower case and not "snake_case" that is mentioned in section 4.2 |
@sachinvodafone Please move these questions to the original PR --> #72 |
Hi @RubenBG7 It seems , PR --> #72 is closed already so not sure if it will be reviewed again. However I will update it as per suggestion. |
@sachinvodafone thanks for your reply. Can I ask why would you favour camel case over the others ? And I would agree that we make our formatting MANDATORY across camara |
Hi @GarethWGSMA Thanks for your concern and reply. As per my view, Camel case or Pascal case is probably good for the resource names as it make it easier to read and remember. It is also recommended by TM Forum in its API guideline recommendation . CamelCase is also popular convention in computer programming and variable names. To keep them consistent and readable, it is best practice to establish same naming conventions within an organisation. |
@sachinvodafone Hi, no I concur I don't really mind which format we adopt - but I would have thought it should be mandatory. I've no experience of why there should be any flexibility with the URI format, it doesn't alter the API in anyway. I was leaning towards spinal case (probably biased because I've used it before), but if TM forums have a standard then maybe we should follow it ? I'm hoping others chime in with the preferences and reasons. |
Hi @sachinvodafone, First of all thanks for your comments. CAMARA is a new standard of APIs that we are creating to be integrated in the NorthBound interfaces of Telcos to be DEVELOPER oriented. TMForum is a good framework to creates APIs Telco Oriented, but CAMARA is not TMForum and it is not Telco Oriented. The biggest Developer oriented marketplaces as Google, Amazon... doesn't follow the TMForum rules... So we need to understand what are the advantages of camelCase in front of Snake_case and same to the errors format proposed. Our criteria to define the API guidelines must be supported by the four pillars of APIfication:
We are also drafting a one-pager where we explain the position of TM Forum Open APIs in the operator's side when implementing CAMARA APIs. In a nutshell, he telco-oriented approach of Open APIs makes them valuable at operator's internal IT stack (specially regarding the integration of API-GW with BSS/OSS suite), but we think neither their as-is style nor structure is valuable for developers. Nonetheless, we will share this one-pager (via PR) as soon as we get it ready. |
I've reviewed the whole proposal with @sachinvodafone, and Vodafone would like to see the following changes to the proposed design guidelines. The remaining proposals are acceptable to us.
|
Changes Applied with @eric-murray comments treated on last Commonalities call. |
@RubenBG7 - did you make some changes to the PR? I can't find them. Can you share a link? |
According to VF comments, we update Guidelines in next titles: 6 - Versioning 8.3 - Filtering
@eric-murray please check updates on commit: Last Commit for Guidelines |
@RubenBG7 A final review yielded some comments on the error codes themselves:
|
Added 206 and 503 https codes
|
Same that 429 , Code 422 is not present in the standard RFCs, When it will be needed in any contract we will include it in the Guidelines. |
I think you need to change the text for 403 errors, as "invalid" is ambiguous. A token can be invalid because it has expired, or the client just used a random token, both of which would be 401. I suggest something like: "It will be returned when the OAuth token access does not have the required scope or when the user fails operational security." |
text for 403 errors updated to be more specific.
Changes applied to be more specific with 403 code description. |
As agreed here https://github.com/camaraproject/WorkingGroups/blob/main/Commonalities/documentation/MeetingMinutes/MOM-2022-11-16.md, merging the PR on 18th EOD |