PagerDuty / api-schema

PagerDuty OpenAPI schemas
30 stars 24 forks source link

OpenAPI issue #463

Open Badge2002 opened 5 months ago

Badge2002 commented 5 months ago

Every test I try is failing. Copilot explains the issue:

The provided YAML excerpt appears to be compliant with the OpenAPI 3.0 specification. However, there are a few potential issues that might be causing non-compliance:

  1. Security Scheme: The security field is supposed to be an array of security requirement objects. Each security requirement object is a map between a named security scheme and a set of scopes. However, in your YAML, the api_key is not defined in the components -> securitySchemes section, which is required by the OpenAPI 3.0 specification.

  2. Missing Paths: The OpenAPI 3.0 specification requires at least one paths item. The provided YAML excerpt does not include any paths, but they might be present in the full file.

  3. Missing Components: The OpenAPI 3.0 specification allows for reusable components under the components field. This includes schemas, responses, parameters, examples, request bodies, headers, security schemes, links, and callbacks. If your API uses any of these and they are not defined in the components section, this could be a source of non-compliance.

Please note that without the full YAML file, it's hard to definitively say why it might not be OpenAPI 3.0 compliant. The issues above are just potential problems based on the provided excerpt.

Badge2002 commented 5 months ago

Fixed one error, still working on the others

security:
  - api_key: []