rules: bigpanda-info-title-prefix: description: API title must start with "BigPanda" message: 'Info title must start with "BigPanda": {{value}}' severity: error given: $.info.title then: function: pattern functionOptions: match: "^BigPanda" bigpanda-info-version-present: description: API info must have a version field message: Info object must include a version severity: error given: $.info then: field: version function: truthy bigpanda-info-contact-present: description: API info must include contact details message: Info object must include contact severity: warn given: $.info then: field: contact function: truthy bigpanda-operation-summary-prefix: description: Operation summaries must start with "BigPanda" message: 'Operation summary must start with "BigPanda": {{value}}' severity: error given: "$.paths[*][*].summary" then: function: pattern functionOptions: match: "^BigPanda" bigpanda-operation-id-camel-case: description: Operation IDs must be camelCase message: 'OperationId must be camelCase: {{value}}' severity: warn given: "$.paths[*][*].operationId" then: function: pattern functionOptions: match: "^[a-z][a-zA-Z0-9]*$" bigpanda-operation-tags-present: description: Every operation must have at least one tag message: Operations must include tags severity: warn given: "$.paths[*][*]" then: field: tags function: truthy bigpanda-operation-description-present: description: Every operation must have a description message: Operations must include description severity: warn given: "$.paths[*][*]" then: field: description function: truthy bigpanda-path-no-trailing-slash: description: Paths must not end with a slash message: 'Path must not end with slash: {{value}}' severity: warn given: "$.paths" then: function: pattern functionOptions: notMatch: "/$" bigpanda-request-body-required: description: POST operations must have a request body message: POST operations must include requestBody severity: error given: "$.paths[*].post" then: field: requestBody function: truthy bigpanda-response-success-present: description: Every operation must define a success response message: Operations must include a 200 or 201 response severity: error given: "$.paths[*][*].responses" then: function: schema functionOptions: schema: type: object anyOf: - required: ['200'] - required: ['201'] bigpanda-schema-title-present: description: All schemas must have a title message: Schemas must include title severity: warn given: "$.components.schemas[*]" then: field: title function: truthy bigpanda-schema-description-present: description: All schemas must have a description message: Schemas must include description severity: warn given: "$.components.schemas[*]" then: field: description function: truthy bigpanda-schema-properties-described: description: Schema properties must have descriptions message: Schema properties must include description severity: warn given: "$.components.schemas[*].properties[*]" then: field: description function: truthy bigpanda-security-scheme-present: description: API must define at least one security scheme message: Components must include securitySchemes severity: error given: "$.components" then: field: securitySchemes function: truthy bigpanda-bearer-auth-used: description: Security scheme must be bearer auth message: BigPanda uses Bearer token authentication severity: warn given: "$.components.securitySchemes[*]" then: function: schema functionOptions: schema: type: object properties: scheme: enum: [bearer] bigpanda-operation-security-present: description: Operations must declare security message: Operations must include security definition severity: warn given: "$.paths[*][get,post,put,patch,delete]" then: field: security function: truthy bigpanda-tags-defined: description: All tags used in operations must be defined at top level message: Tags must be defined in the global tags section severity: warn given: "$.tags" then: function: truthy bigpanda-servers-present: description: API must define servers message: Servers array must be present and non-empty severity: error given: "$" then: field: servers function: truthy bigpanda-server-https: description: Server URL must use HTTPS message: 'Server URL must use HTTPS: {{value}}' severity: error given: "$.servers[*].url" then: function: pattern functionOptions: match: "^https://" bigpanda-operation-examples-present: description: Responses with content should include examples message: Response content should include examples severity: warn given: "$.paths[*][*].responses[*].content[*]" then: field: examples function: truthy bigpanda-microcks-operation-present: description: Every operation must include x-microcks-operation extension message: Operations must include x-microcks-operation severity: warn given: "$.paths[*][*]" then: field: x-microcks-operation function: truthy bigpanda-alert-app-key-required: description: Alert requests must include app_key field message: AlertRequest schema must have app_key as required severity: warn given: "$.components.schemas.AlertRequest.required" then: function: schema functionOptions: schema: type: array contains: type: string enum: [app_key] bigpanda-license-present: description: API info must include license message: Info must include license severity: warn given: "$.info" then: field: license function: truthy