Comments (5)
This looks like a good improvement to include these error codes and they align with commonalities.
from qualityondemand.
Some of these errors, which not directly related to the API semantics but with general processing of an API gateway, are not generally explicitly documented in OAS specs. It is not obvious how certain codes should be documented, e.g. for 405 we would need to include all not allowed methods per path and document explicitly that 405 is to be returned if that verb is used.
Decision to add explicitly certain transversal responses to every operation of every CAMARA API is something that should be make clear in Commonalities. A possibility is to include all schemas under https://github.com/camaraproject/Commonalities/blob/main/artifacts/CAMARA_common.yaml#L130, with all generic codes + the API specific ones. But if we don't consider crossed $ref support between WG specs and common artifacts, maintenance will be complex and length of API specs will be increased a lot.
from qualityondemand.
@jlurien good points ... also for me it is unclear if the generic responses which are indicating that the API isn't used as specified must or even should be included within API Spec, especially all possible results with every operation. The same for the server errors which can happen with every operation like 500 and 503. Currently we have some kind of middle way within the spec ... some are listed, some other are not.
For me it would be currently enough if the transversal ones are listed only in the Design Guidelines and in https://github.com/camaraproject/Commonalities/blob/main/artifacts/CAMARA_common.yaml#L130.
What we need is something like the Design Guideline has done already for header parameters:
- defining if an error response must be listed within the OAS if the operation is allowed to return it
- an example could be 501 ... the response must only be listed if an API Provider can decide to not implement the method
- all application specific responses would belong here
- define which error response will not be listed within the OAS as a potential response
- e.g. 405 does not make sense for me as a response for a specified method. In addition I would expect that only the defined methods are supported, so implicit all methods which are not defined may return 405.
For now, this issue and the PR my proposal would be to reduce the added error responses to 429, and don't add 405, 406 and 415.
from qualityondemand.
@jlurien and @hdamker I understand and agree on your feedback.
I will remove everything instead 429
from qualityondemand.
@maxl2287 I fully understand the addition of 429 to createSession
and extendDuration
as there could be business quota cases, but I would question if we need to add the transversal case of a rate limiting error to every operation, especially within qos-profiles
, as there no resources will be created. As a result there would be no changes to qos-profiles
.
from qualityondemand.
Related Issues (20)
- Adding `notificationUrl` as an optional property in `CloudEvents` HOT 1
- Return 422 instead of 501 if the service is not implemented for specified device
- Align error responses for Device Object with v0.4.0 of Design Guidelines HOT 1
- Application IPs are not shared by OTT for QOD API HOT 4
- Updating API Readiness Checklist(s) with new template
- Remove unresolved reference within quality-on-demand documentation
- Remove cucumber code from the repository HOT 1
- Device in response object need to be omitted or clearer defined HOT 3
- Fill API Readiness Cheklist for qod-provisioning
- Alignment of notification web hook to CloudEvent subscription model HOT 1
- Update reference to the QoS Profiles API HOT 2
- Prepare release PR for r1.1
- Potential enhancement of booking feature for qod-provision HOT 1
- Remove reference to protocol in sink description HOT 3
- Mentioning of the device object in the Session Info description
- Add user story for QoS Profile
- Review and update User Story for Quality On Demand
- Quality on Demand example RETRIEVE_SESSIONS_EXAMPLE must use sink HOT 2
- Operation to get qos-profiles for a device MUST use a verb and needs a security object HOT 2
- Info "The developer can optionally specify the duration" is wrong
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qualityondemand.