callback-only-post-method-allowed
Overview
This rule belongs to the openapi-v3-apimatic-linting ruleset and states that:
API callbacks are server-initiated notifications sent to a client-specified URL. Only the POST HTTP method is allowed for callback operations. Using any other method is not supported.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Callback operations must only use the POST HTTP method. |
| Code | OPENAPI3APIMATIC_L500 |
| Type | Linting |
| Rule System | Semantic |
| Broad Category | OpenAPI Callbacks |
| Products Impacted | Code Generation, Developer Experience Portal |
| Tags | openapi3 openapi apimatic semantic linting callback method post operation |
Suggested Fixes
- Ensure that all callback operations use the POST HTTP method.
- Remove or change any callback operations that use non-POST HTTP methods.
For More Information
- https://docs.apimatic.io/specification-extensions/swagger-codegen-extensions/#callback-group-extension
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#callback-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md
- https://docs.apimatic.io/rulesets/overview/