Repository navigation
fix: align API with CAMARA Commonalities r4.3 validation requirements - #40
Conversation
- Add 3 mandatory CAMARA info.description template blocks (authorization-and-authentication, additional-error-responses, request-body-strictness) - Set x-camara-commonalities: wip - Replace inline XCorrelator, ErrorInfo schemas with CAMARA_common.yaml refs - Replace Generic400/401/403/404/429 inline responses with CAMARA_common.yaml refs - Replace inline openId securityScheme, x-correlator header/parameter with CAMARA_common.yaml refs - Replace inline SingleIpv4Addr with CAMARA_common.yaml SingleIpv4Address ref - Add maxLength to all string fields (S-312) - Add maxItems: 20 to all array fields (S-309) - Add format: int32 and min: 1 to Port schema (S-310/S-311) - Delete placeholder README.MD (P-013) - Delete API-Readiness-Checklist.md (P-032)
CAMARA Validation — PASS0 errors, 0 warnings, 0 hints | Profile: standard |
|
LGTM |
| example: "AppProvider" | ||
| applicationDescription: | ||
| type: string | ||
| maxLength: 2048 |
There was a problem hiding this comment.
2048 seems excessive - especially given the example, which just shows the application category. 256 seems more than enough. Is there a reason why it should be that long?
There was a problem hiding this comment.
Hi @Kevsy. I have user 256 for other parameters like applicationProviderName, but used a higher value of 2048 for description field which is meant for more descriptive text which helps users with more details about the application or specific instance.
CAMARA APIs use 2048 max length as per commonalities standards in some cases like below:
Source:
type: string
format: uri-reference
minLength: 1
maxLength: 2048
description: |
Identifies the context in which an event happened - be a non-empty URI-reference like:
- URI with a DNS authority:
* https://github.com/cloudevents
* mailto:cncf-wg-serverless@lists.cncf.io
- Universally-unique URN with a UUID:
* urn:uuid:6e8bc430-9c3a-11d9-9669-0800200c9a66
- Application-specific identifier:
* /cloudevents/spec/pull/123
* 1-555-123-4567
example: "https://notificationSendServer12.example.com"
having a higher value provides more flexibility to the users of the API even if they might not need it all the time.
| $ref: "#/components/schemas/EdgeCloudZone" | ||
| applicationEndpointDescription: | ||
| type: string | ||
| maxLength: 2048 |
There was a problem hiding this comment.
Same comment as earlier, 2048 seems excessive.
There was a problem hiding this comment.
same feedback as the previous comment.
Kevsy
left a comment
There was a problem hiding this comment.
^ just the comments above about string length for the application description, otherwise LGTM
Removing objection to 2048 max description length following Mahesh's explanation.
Summary
Fixes all 25 CAMARA validation warnings identified in the r4.3 validation run, to unblock the Sync26 meta-release snapshot.
fixes #39
Changes
Mandatory info.description templates (P-026)
authorization-and-authenticationblockadditional-error-responsesblockrequest-body-strictnessblockx-camara-commonalities: wipCommon schema references (replaces inline definitions)
securitySchemes/openId→CAMARA_common.yamlheaders/x-correlator→CAMARA_common.yamlparameters/x-correlator→CAMARA_common.yamlXCorrelatorschema deleted (was duplicating common)ErrorInfoschema deleted (was duplicating common)Generic400/401/403/404/429responses →CAMARA_common.yamlSingleIpv4Addr→CAMARA_common.yaml#/components/schemas/SingleIpv4AddressString/array/integer constraints
maxLengthadded to all string fields (S-312)maxItems: 20added to all array fields (S-309)Port: addedformat: int32, changedminimumfrom 0 to 1 (S-310/S-311, aligns with CAMARA_common.yaml Port definition)Placeholder file removal
code/API_definitions/README.MD(P-013)documentation/API_documentation/Application-Endpoint-Registration-API-Readiness-Checklist.md(P-032)Test plan
$refpaths resolve correctly againstCAMARA_common.yaml