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
Now that the API is cleaned up, and deadcode/endpoints are eliminated we need to ensure that all OpenAPI lints currently reporting as warnings are eliminated.
AND those lints need to be promoted to errors, so that they don't get re-introduced.
The current main branch reports the following:
1206:22 warning api-example-schema Schema should contain example paths./api/draft/cardano/date_time_to_slot_number.get.parameters[0].schema
1900:22 warning api-example-schema Schema should contain example paths./api/draft/rbac/registrations/{chain_root}.get.parameters[0].schema
2256:22 warning api-example-schema Schema should contain example paths./api/draft/rbac/role0_chain_root/{role0_key}.get.parameters[0].schema
2680:22 warning api-example-schema Schema should contain example paths./api/draft/cardano/assets/{stake_address}.get.parameters[2].schema
4599:26 warning api-example-schema Schema should contain example paths./api/draft/document/{document_id}.get.responses[200].content.application/cbor.schema
4799:24 warning api-example-schema Schema should contain example paths./api/draft/document.put.requestBody.content.application/cbor.schema
5254:24 warning api-example-schema Schema should contain example paths./api/draft/document/index.post.requestBody.content['application/json; charset=utf-8'].schema
5734:24 warning api-example-properties Property should contain example components.schemas.Cip36Details.properties.is_payable
5739:19 warning api-example-properties Property should contain example components.schemas.Cip36Details.properties.cip15
5744:20 warning api-example-properties Property should contain example components.schemas.Cip36Details.properties.errors
5790:24 warning api-example-properties Property should contain example components.schemas.Cip36RegistrationList.properties.voting_key
5798:21 warning api-example-properties Property should contain example components.schemas.Cip36RegistrationList.properties.invalid
5806:18 warning api-example-properties Property should contain example components.schemas.Cip36RegistrationList.properties.page
5875:27 warning api-example-properties Property should contain example components.schemas.Cip36RegistrationsForVotingPublicKey.properties.registrations
5907:19 warning api-example-properties Property should contain example components.schemas.ConfigBadRequest.properties.error
5913:38 warning api-example-properties Property should contain example components.schemas.ConfigBadRequest.properties.schema_validation_errors
5935:17 warning api-example-properties Property should contain example components.schemas.ContentErrorDetail.properties.loc
6024:33 warning api-example-schema Schema should contain example components.schemas.DeepQueryInspectionFlag
6039:18 warning api-example-properties Property should contain example components.schemas.DocumentIndexList.properties.docs
6083:18 warning api-example-properties Property should contain example components.schemas.DocumentIndexList.properties.page
6499:16 warning api-example-properties Property should contain example components.schemas.Forbidden.properties.id
6504:17 warning api-example-properties Property should contain example components.schemas.Forbidden.properties.msg
6510:22 warning api-example-properties Property should contain example components.schemas.Forbidden.properties.required
6534:20 warning api-example-properties Property should contain example components.schemas.FrontendConfig.properties.sentry
6562:22 warning api-example-properties Property should contain example components.schemas.FullStakeInfo.properties.volatile
6573:24 warning api-example-properties Property should contain example components.schemas.FullStakeInfo.properties.persistent
6775:17 warning api-example-properties Property should contain example components.schemas.IndexedDocument.properties.ver
6860:17 warning api-example-properties Property should contain example components.schemas.IndexedDocumentVersion.properties.ref
6871:19 warning api-example-properties Property should contain example components.schemas.IndexedDocumentVersion.properties.reply
6882:22 warning api-example-properties Property should contain example components.schemas.IndexedDocumentVersion.properties.template
6893:19 warning api-example-properties Property should contain example components.schemas.IndexedDocumentVersion.properties.brand
6904:22 warning api-example-properties Property should contain example components.schemas.IndexedDocumentVersion.properties.campaign
6915:22 warning api-example-properties Property should contain example components.schemas.IndexedDocumentVersion.properties.category
6944:16 warning api-example-properties Property should contain example components.schemas.InternalServerError.properties.id
6949:17 warning api-example-properties Property should contain example components.schemas.InternalServerError.properties.msg
6955:19 warning api-example-properties Property should contain example components.schemas.InternalServerError.properties.issue
6968:18 warning api-example-schema Schema should contain example components.schemas.LogLevel
6978:17 warning api-example-schema Schema should contain example components.schemas.Network
6994:19 warning api-example-properties Property should contain example components.schemas.PutDocumentBadRequest.properties.error
7000:20 warning api-example-properties Property should contain example components.schemas.PutDocumentBadRequest.properties.report
7015:21 warning api-example-properties Property should contain example components.schemas.RbacRegistration.properties.tx_hash
7028:35 warning api-example-schema Schema should contain example components.schemas.RbacRegistrationsResponse
7035:27 warning api-example-properties Property should contain example components.schemas.RbacRegistrationsResponse.properties.registrations
7045:36 warning api-example-schema Schema should contain example components.schemas.RbacRole0ChainRootResponse
7052:24 warning api-example-properties Property should contain example components.schemas.RbacRole0ChainRootResponse.properties.chain_root
7061:18 warning api-example-schema Schema should contain example components.schemas.Response
7068:24 warning api-example-properties Property should contain example components.schemas.Response.properties.chain_root
7084:17 warning api-example-properties Property should contain example components.schemas.Sentry.properties.dsn
7090:21 warning api-example-properties Property should contain example components.schemas.Sentry.properties.release
7096:25 warning api-example-properties Property should contain example components.schemas.Sentry.properties.environment
7117:16 warning api-example-properties Property should contain example components.schemas.ServiceUnavailable.properties.id
7122:17 warning api-example-properties Property should contain example components.schemas.ServiceUnavailable.properties.msg
7143:25 warning api-example-properties Property should contain example components.schemas.Slot.properties.slot_number
7150:24 warning api-example-properties Property should contain example components.schemas.Slot.properties.block_hash
7161:24 warning api-example-properties Property should contain example components.schemas.Slot.properties.block_time
7177:22 warning api-example-properties Property should contain example components.schemas.SlotInfo.properties.previous
7188:21 warning api-example-properties Property should contain example components.schemas.SlotInfo.properties.current
7199:18 warning api-example-properties Property should contain example components.schemas.SlotInfo.properties.next
7238:24 warning api-example-properties Property should contain example components.schemas.StakeInfo.properties.ada_amount
7245:25 warning api-example-properties Property should contain example components.schemas.StakeInfo.properties.slot_number
7252:27 warning api-example-properties Property should contain example components.schemas.StakeInfo.properties.native_tokens
7315:16 warning api-example-properties Property should contain example components.schemas.TooManyRequests.properties.id
7320:17 warning api-example-properties Property should contain example components.schemas.TooManyRequests.properties.msg
7340:16 warning api-example-properties Property should contain example components.schemas.Unauthorized.properties.id
7368:20 warning api-example-properties Property should contain example components.schemas.UnprocessableContent.properties.detail
This is all about missing examples, which the Open API document must be complete.
The examples should be valid examples, not just random values.
For example, the CIP36 response example should reflect a CIP36 registration that's found on pre-prod.
The example query parameters and the response example should align, such that if I execute that endpoint on pre-prod with those parameters i get the example response back from the service.
This helps understandability.
They also help automated testing tools like schemathesis generate tests.
Change the schema lint configuration to turn all warnings int errors.
Add valid examples to every type that is missing an example.
Acceptance Criteria
All warnings in the schema lint configuration are changed to errors which will fail CI.
All missing examples are implemented.
Examples match live expected data from the pre-prod network
Example query parameter values will generate the example response (where possible).
The text was updated successfully, but these errors were encountered:
Summary
API is mising examples, they need to be added
Description
Now that the API is cleaned up, and deadcode/endpoints are eliminated we need to ensure that all OpenAPI lints currently reporting as warnings are eliminated.
AND those lints need to be promoted to errors, so that they don't get re-introduced.
The current
main
branch reports the following:This is all about missing examples, which the Open API document must be complete.
The examples should be valid examples, not just random values.
For example, the CIP36 response example should reflect a CIP36 registration that's found on pre-prod.
The example query parameters and the response example should align, such that if I execute that endpoint on pre-prod with those parameters i get the example response back from the service.
This helps understandability.
They also help automated testing tools like schemathesis generate tests.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: