diff --git a/src/all-rules.json b/src/all-rules.json index 6340015..cf70f5e 100644 --- a/src/all-rules.json +++ b/src/all-rules.json @@ -1 +1 @@ -{"openapi":{"array-items":{"title":"Array Items","reference":"https://spotlight-rules.com/spec/rules/openapi/array-items/","description":"Array Items.","source":"builtin","message":"Schemas with \"type: array\", require a sibling \"items\" field","severity":"info","given":"#ArrayProperties","then":{"function":"truthy","field":"items"},"tags":["format:openapi","spec:schemas","experience:data-modeling","experience:reliability"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'array-items' (Array Items). Requirement: Array Items. To fix: Ensure `items` is present and non-empty at each matching location. This rule is evaluated at the JSONPath `#ArrayProperties` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"channel-parameter-require-examples":{"title":"Channel Parameter Require Examples","reference":"https://spotlight-rules.com/spec/rules/openapi/channel-parameter-require-examples/","source":"compiled","description":"Parameter must have examples.","message":"Parameter must have examples","severity":"info","given":"$.channels.*.parameters.*.schema","then":{"field":"examples","function":"truthy"},"formats":["aas2"],"tags":["format:openapi","spec:channels","spec:parameters","spec:schemas","experience:documentation","experience:usability"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'channel-parameter-require-examples' (Channel Parameter Require Examples). Requirement: Parameter must have examples. To fix: Ensure `examples` is present and non-empty at each matching location. This rule is evaluated at the JSONPath `$.channels.*.parameters.*.schema` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"component-example-keys-snake-case":{"title":"Component Example Keys Snake Case","reference":"https://spotlight-rules.com/spec/rules/openapi/component-example-keys-snake-case/","source":"compiled","description":"example key must be snake cased (e.g. snake_case).","message":"{{error}}","severity":"info","given":"$.components['examples'].*~","then":{"function":"digitalocean:ensureSnakeCaseWithDigits"},"tags":["format:openapi","spec:components","spec:examples","experience:naming","experience:consistency"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'component-example-keys-snake-case' (Component Example Keys Snake Case). Requirement: example key must be snake cased (e.g. snake_case). This rule is evaluated at the JSONPath `$.components['examples'].*~` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"component-message-require-examples":{"title":"Component Message Require Examples","reference":"https://spotlight-rules.com/spec/rules/openapi/component-message-require-examples/","source":"compiled","description":"Message must have examples.","message":"Message must have examples","severity":"info","given":"$.components.messages.*","then":{"field":"examples","function":"truthy"},"formats":["aas3"],"tags":["format:openapi","spec:messages","spec:components","experience:documentation","experience:usability"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'component-message-require-examples' (Component Message Require Examples). Requirement: Message must have examples. To fix: Ensure `examples` is present and non-empty at each matching location. This rule is evaluated at the JSONPath `$.components.messages.*` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"component-require-security-schemes":{"title":"Component Require Security Schemes","reference":"https://spotlight-rules.com/spec/rules/openapi/component-require-security-schemes/","source":"compiled","description":"The API contract MUST include a 'securitySchemes' subsection under the 'components' section.","message":"{{description}}: {{error}}","severity":"info","given":"$.components","then":{"field":"securitySchemes","function":"truthy"},"formats":["oas3"],"tags":["owasp:api2","format:openapi","spec:components","experience:security","experience:governance"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'component-require-security-schemes' (Component Require Security Schemes). Requirement: The API contract MUST include a 'securitySchemes' subsection under the 'components' section. To fix: Ensure `securitySchemes` is present and non-empty at each matching location. This rule is evaluated at the JSONPath `$.components` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"contact-properties":{"title":"Contact Properties","reference":"https://spotlight-rules.com/spec/rules/openapi/contact-properties/","source":"builtin","description":"Contact object must have \"name\", \"url\" and \"email\".","message":"Contact object must have \"name\", \"url\" and \"email\".","severity":"info","given":"$.info.contact","then":[{"field":"name","function":"truthy"},{"field":"url","function":"truthy"},{"field":"email","function":"truthy"}],"tags":["format:openapi","spec:info","experience:documentation","experience:discoverability"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'contact-properties' (Contact Properties). Requirement: Contact object must have \"name\", \"url\" and \"email\". To fix: Ensure `name` is present and non-empty at each matching location. Also: Ensure `url` is present and non-empty at each matching location. Also: Ensure `email` is present and non-empty at each matching location. This rule is evaluated at the JSONPath `$.info.contact` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"document-cache-control-parameter":{"title":"Document Cache Control Parameter","reference":"https://spotlight-rules.com/spec/rules/openapi/document-cache-control-parameter/","source":"compiled","description":"Cache usage SHOULD be extensively detailed in the `description` property to avoid data leaks or the usage of stale data. This rule should ensure in some way that the api provider documented extensively the cache usage to avoid data leaks or usage of stale data. For now this ruleset tests: * the presence of following keywords in the `description`: `max-age`, `private`, `no-store`, `no-cache`. * that one and only one between Expires and Cache-Control is used. `Cache-Control` and `Expires` should not be used in conjuction, because `Cache-Control` overrides `Expires` when `max-age` is set. Instead if neither `Cache-Control` or `Expires` are set, clients MAY use euristic cache like described in RFC7234.","message":"Cache usage SHOULD be documented when used.","severity":"info","given":"$..[parameters][?(@.in == \"header\" && @.name.match(/Cache-Control/i))]","then":[{"field":"description","function":"truthy"},{"field":"description","function":"pattern","functionOptions":{"match":".*(max-age|private|no-store|no-cache).*"}}],"formats":["oas3"],"tags":["format:openapi","spec:parameters","spec:headers","topic:caching","experience:documentation","experience:reliability","experience:performance"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'document-cache-control-parameter' (Document Cache Control Parameter). Requirement: Cache usage SHOULD be extensively detailed in the `description` property to avoid data leaks or the usage of stale data. This rule should ensure in some way that the api provider documented extensively the cache usage to avoid data leaks or usage of stale data. For now this ruleset tests: * the presence of following keywords in the `description`: `max-age`, `private`, `no-store`, `no-cache`. * that one and only one between Expires and Cache-Control is used. `Cache-Control` and `Expires` should not be used in conjuction, because `Cache-Control` overrides `Expires` when `max-age` is set. Instead if neither `Cache-Control` or `Expires` are set, clients MAY use euristic cache like described in RFC7234. To fix: Ensure `description` is present and non-empty at each matching location. Also: Ensure `description` matches the regular expression `.*(max-age|private|no-store|no-cache).*`; rewrite any value that does not. This rule is evaluated at the JSONPath `$..[parameters][?(@.in == \"header\" && @.name.match(/Cache-Control/i))]` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"document-cache-response-header":{"title":"Document Cache Response Header","reference":"https://spotlight-rules.com/spec/rules/openapi/document-cache-response-header/","source":"compiled","description":"Cache usage SHOULD be extensively detailed in the `description` property to avoid data leaks or the usage of stale data. This rule should ensure in some way that the api provider documented extensively the cache usage to avoid data leaks or usage of stale data. For now this ruleset tests: * the presence of following keywords in the `description`: `max-age`, `private`, `no-store`, `no-cache`. * that one and only one between Expires and Cache-Control is used. `Cache-Control` and `Expires` should not be used in conjuction, because `Cache-Control` overrides `Expires` when `max-age` is set. Instead if neither `Cache-Control` or `Expires` are set, clients MAY use euristic cache like described in RFC7234.","message":"Cache usage in responses SHOULD be documented in Cache-Control and/or Expires. {{error}}","severity":"info","given":"$.[responses][?(@property[0] == \"2\" )][headers].[?(@property.match(/Cache-Control|Expires/i))]]","then":[{"field":"description","function":"truthy"},{"field":"description","function":"pattern","functionOptions":{"match":".*(max-age|private|no-store|no-cache).*"}}],"formats":["oas3"],"tags":["format:openapi","spec:responses","spec:headers","topic:caching","experience:documentation","experience:reliability","experience:performance"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'document-cache-response-header' (Document Cache Response Header). Requirement: Cache usage SHOULD be extensively detailed in the `description` property to avoid data leaks or the usage of stale data. This rule should ensure in some way that the api provider documented extensively the cache usage to avoid data leaks or usage of stale data. For now this ruleset tests: * the presence of following keywords in the `description`: `max-age`, `private`, `no-store`, `no-cache`. * that one and only one between Expires and Cache-Control is used. `Cache-Control` and `Expires` should not be used in conjuction, because `Cache-Control` overrides `Expires` when `max-age` is set. Instead if neither `Cache-Control` or `Expires` are set, clients MAY use euristic cache like described in RFC7234. To fix: Ensure `description` is present and non-empty at each matching location. Also: Ensure `description` matches the regular expression `.*(max-age|private|no-store|no-cache).*`; rewrite any value that does not. This rule is evaluated at the JSONPath `$.[responses][?(@property[0] == \"2\" )][headers].[?(@property.match(/Cache-Control|Expires/i))]]` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"document-owasp-api9-server":{"title":"Document OWASP API9 Server","reference":"https://spotlight-rules.com/spec/rules/openapi/document-owasp-api9-server/","source":"spotlight","description":"The API should declare its servers so all hosts and environments are inventoried — undocumented or stray non-production hosts are a common inventory-management risk (OWASP API9).","message":"API should declare its servers (host/environment inventory).","given":"$","severity":"info","then":{"field":"servers","function":"truthy"},"tags":["format:openapi","spec:servers","experience:security","experience:governance","owasp:api9"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'document-owasp-api9-server' (Document OWASP API9 Server). Requirement: The API should declare its servers so all hosts and environments are inventoried — undocumented or stray non-production hosts are a common inventory-management risk (OWASP API9). To fix: Ensure `servers` is present and non-empty at each matching location. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"document-require-component-section":{"title":"Document Require Component Section","reference":"https://spotlight-rules.com/spec/rules/openapi/document-require-component-section/","source":"compiled","description":"The API contract MUST include a 'components' section.","message":"{{description}}: {{error}}","severity":"info","given":"$","then":{"field":"components","function":"truthy"},"formats":["oas3"],"tags":["format:openapi","spec:document","experience:consistency","experience:governance"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'document-require-component-section' (Document Require Component Section). Requirement: The API contract MUST include a 'components' section. To fix: Ensure `components` is present and non-empty at each matching location. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"document-require-external-docs":{"title":"Document Require External Docs","reference":"https://spotlight-rules.com/spec/rules/openapi/document-require-external-docs/","source":"compiled","description":"Defining external documentation provides a link to detailed API guides, tutorials, and reference material beyond the OpenAPI spec. Analysis shows 57.1% of APIs include external docs.","message":"External Docs MUST Be Defined","severity":"info","given":"$","then":{"field":"externalDocs","function":"truthy"},"tags":["format:openapi","spec:document","experience:documentation","experience:discoverability"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'document-require-external-docs' (Document Require External Docs). Requirement: Defining external documentation provides a link to detailed API guides, tutorials, and reference material beyond the OpenAPI spec. Analysis shows 57.1% of APIs include external docs. To fix: Ensure `externalDocs` is present and non-empty at each matching location. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"document-require-jsonschemadialect":{"title":"Document Require Jsonschemadialect","reference":"https://spotlight-rules.com/spec/rules/openapi/document-require-jsonschemadialect/","source":"spotlight","description":"openapi document should declare a `jsonSchemaDialect` property.","message":"Missing `jsonSchemaDialect`.","given":"$","severity":"info","then":{"field":"jsonSchemaDialect","function":"truthy"},"tags":["format:openapi","spec:document","experience:governance","experience:discoverability"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'document-require-jsonschemadialect' (Document Require Jsonschemadialect). Requirement: openapi document should declare a `jsonSchemaDialect` property. To fix: Ensure `jsonSchemaDialect` is present and non-empty at each matching location. Guidance: Missing `jsonSchemaDialect`. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"document-require-openapi":{"title":"Document Require Openapi","reference":"https://spotlight-rules.com/spec/rules/openapi/document-require-openapi/","source":"spotlight","description":"openapi document should declare a `openapi` property.","message":"Missing `openapi`.","given":"$","severity":"info","then":{"field":"openapi","function":"truthy"},"tags":["format:openapi","spec:document","experience:governance","experience:discoverability"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'document-require-openapi' (Document Require Openapi). Requirement: openapi document should declare a `openapi` property. To fix: Ensure `openapi` is present and non-empty at each matching location. Guidance: Missing `openapi`. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"document-require-path":{"title":"Document Require Path","reference":"https://spotlight-rules.com/spec/rules/openapi/document-require-path/","source":"spotlight","description":"openapi document should declare a `paths` property.","message":"Missing `paths`.","given":"$","severity":"info","then":{"field":"paths","function":"truthy"},"tags":["format:openapi","spec:document","experience:governance","experience:discoverability"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'document-require-path' (Document Require Path). Requirement: openapi document should declare a `paths` property. To fix: Ensure `paths` is present and non-empty at each matching location. Guidance: Missing `paths`. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"document-require-realistic-examples":{"title":"Document Require Realistic Examples","reference":"https://spotlight-rules.com/spec/rules/openapi/document-require-realistic-examples/","source":"compiled","description":"API design SHOULD include real-like examples for request and response definitions.","message":"The {{property}} SHOULD include a real-like example. Add realistic examples to improve API usability.","severity":"info","given":"$..[?(@.example || @.examples)]","then":{"field":"example","function":"truthy"},"formats":["oas3"],"tags":["format:openapi","spec:examples","experience:documentation","experience:usability"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'document-require-realistic-examples' (Document Require Realistic Examples). Requirement: API design SHOULD include real-like examples for request and response definitions. To fix: Ensure `example` is present and non-empty at each matching location. This rule is evaluated at the JSONPath `$..[?(@.example || @.examples)]` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"document-require-server-defined":{"title":"Document Require Server Defined","reference":"https://spotlight-rules.com/spec/rules/openapi/document-require-server-defined/","source":"compiled","description":"Every OpenAPI should define at least one server URL. Analysis shows 97.2% of APIs define servers, providing consumers with the base URL needed to make requests.","message":"Servers MUST Be Defined","severity":"info","given":"$","then":{"field":"servers","function":"truthy"},"tags":["format:openapi","spec:document","experience:usability","experience:discoverability"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'document-require-server-defined' (Document Require Server Defined). Requirement: Every OpenAPI should define at least one server URL. Analysis shows 97.2% of APIs define servers, providing consumers with the base URL needed to make requests. To fix: Ensure `servers` is present and non-empty at each matching location. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"document-require-webhooks":{"title":"Document Require Webhooks","reference":"https://spotlight-rules.com/spec/rules/openapi/document-require-webhooks/","source":"spotlight","description":"openapi document should declare a `webhooks` property.","message":"Missing `webhooks`.","given":"$","severity":"info","then":{"field":"webhooks","function":"truthy"},"tags":["format:openapi","spec:document","experience:governance","experience:discoverability"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'document-require-webhooks' (Document Require Webhooks). Requirement: openapi document should declare a `webhooks` property. To fix: Ensure `webhooks` is present and non-empty at each matching location. Guidance: Missing `webhooks`. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"document-spec-must-not-be-empty":{"title":"Document Spec Must Not Be Empty","reference":"https://spotlight-rules.com/spec/rules/openapi/document-spec-must-not-be-empty/","source":"compiled","description":"Spec should not be empty.","message":"{{error}}","severity":"info","given":"$","then":{"function":"trimble:is-valid-spec"},"tags":["format:openapi","spec:document","experience:governance"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'document-spec-must-not-be-empty' (Document Spec Must Not Be Empty). Requirement: Spec should not be empty. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"duplicated-entry-in-enum":{"title":"Duplicated Entry In Enum","reference":"https://spotlight-rules.com/spec/rules/openapi/duplicated-entry-in-enum/","source":"builtin","description":"Enum values must not have duplicate entry.","message":"{{error}}","severity":"info","given":["$..[?(@property !== 'properties' && @.enum && @.enum.constructor.name === 'Array')]"],"then":{"field":"enum","function":"oasSchema","functionOptions":{"schema":{"type":"array","uniqueItems":true}}},"tags":["format:openapi","spec:schemas","experience:data-modeling","experience:consistency"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'duplicated-entry-in-enum' (Duplicated Entry In Enum). Requirement: Enum values must not have duplicate entry. This rule is evaluated at the JSONPath `$..[?(@property !== 'properties' && @.enum && @.enum.constructor.name === 'Array')]` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"header-names-hyphenated-pascal-case":{"title":"Header Names Hyphenated Pascal Case","reference":"https://spotlight-rules.com/spec/rules/openapi/header-names-hyphenated-pascal-case/","source":"compiled","description":"All `HTTP` headers MUST use `Hyphenated-Pascal-Case` notation.","message":"'HTTP' headers MUST follow 'Hyphenated-Pascal-Case' notation","severity":"info","given":"$..parameters[?(@.in == 'header')].name","then":{"function":"pattern","functionOptions":{"match":"/^([A-Z][a-z0-9]-)*([A-Z][a-z0-9])+/"}},"tags":["format:openapi","spec:parameters","spec:headers","experience:naming","experience:consistency"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'header-names-hyphenated-pascal-case' (Header Names Hyphenated Pascal Case). Requirement: All `HTTP` headers MUST use `Hyphenated-Pascal-Case` notation. To fix: Ensure the targeted value matches the regular expression `/^([A-Z][a-z0-9]-)*([A-Z][a-z0-9])+/`; rewrite any value that does not. This rule is evaluated at the JSONPath `$..parameters[?(@.in == 'header')].name` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"header-no-x-prefix":{"title":"Header No X Prefix","reference":"https://spotlight-rules.com/spec/rules/openapi/header-no-x-prefix/","source":"compiled","description":"'HTTP' headers SHOULD NOT start with 'X-' RFC6648.","message":"HTTP header '{{value}}' SHOULD NOT start with 'X-' in {{path}}","severity":"info","given":["$..parameters[?(@.in == 'header')].name"],"then":{"function":"pattern","functionOptions":{"match":"/^([^x]|.[^-])|RateLimit-/i"}},"tags":["format:openapi","spec:parameters","spec:headers","experience:naming","experience:consistency"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'header-no-x-prefix' (Header No X Prefix). Requirement: 'HTTP' headers SHOULD NOT start with 'X-' RFC6648. To fix: Ensure the targeted value matches the regular expression `/^([^x]|.[^-])|RateLimit-/i`; rewrite any value that does not. This rule is evaluated at the JSONPath `$..parameters[?(@.in == 'header')].name` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"header-require-examples":{"title":"Header Require Examples","reference":"https://spotlight-rules.com/spec/rules/openapi/header-require-examples/","source":"compiled","description":"Headers must include examples.","message":"{{description}}; missing {{property}}","severity":"info","given":"$..headers.*","then":{"function":"digitalocean:ensurePropertiesExample"},"tags":["format:openapi","spec:headers","experience:documentation","experience:usability"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'header-require-examples' (Header Require Examples). Requirement: Headers must include examples. This rule is evaluated at the JSONPath `$..headers.*` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"info-contact":{"title":"Info Contact","reference":"https://spotlight-rules.com/spec/rules/openapi/info-contact/","source":"builtin","description":"Info object must have \"contact\" object.","message":"Info object must have \"contact\" object.","severity":"info","given":"$","then":{"field":"info.contact","function":"truthy"},"tags":["format:openapi","spec:document","experience:documentation","experience:discoverability"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'info-contact' (Info Contact). Requirement: Info object must have \"contact\" object. To fix: Ensure `info.contact` is present and non-empty at each matching location. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"info-contact-require-email":{"title":"Info Contact Require Email","reference":"https://spotlight-rules.com/spec/rules/openapi/info-contact-require-email/","source":"compiled","description":"Having a contact email address associated with the technical contract ensures that anyone who comes across the API has someone to email and get more information.","message":"Info MUST Have Contact Email","severity":"info","given":"$.info.contact","then":{"field":"email","function":"truthy"},"tags":["format:openapi","spec:info","experience:discoverability","experience:documentation"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'info-contact-require-email' (Info Contact Require Email). Requirement: Having a contact email address associated with the technical contract ensures that anyone who comes across the API has someone to email and get more information. To fix: Ensure `email` is present and non-empty at each matching location. This rule is evaluated at the JSONPath `$.info.contact` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"info-contact-require-name":{"title":"Info Contact Require Name","reference":"https://spotlight-rules.com/spec/rules/openapi/info-contact-require-name/","source":"compiled","description":"Having a contact name associated with the technical contract ensures that anyone who comes across the API knows who to contact.","message":"Info MUST Have Contact Name","severity":"info","given":"$.info.contact","then":{"field":"name","function":"truthy"},"tags":["format:openapi","spec:info","experience:discoverability","experience:documentation"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'info-contact-require-name' (Info Contact Require Name). Requirement: Having a contact name associated with the technical contract ensures that anyone who comes across the API knows who to contact. To fix: Ensure `name` is present and non-empty at each matching location. This rule is evaluated at the JSONPath `$.info.contact` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"info-contact-require-url":{"title":"Info Contact Require URL","reference":"https://spotlight-rules.com/spec/rules/openapi/info-contact-require-url/","source":"compiled","description":"Having a contact url associated with the technical contract ensures that anyone who comes across the API knows where to go to contact someone.","message":"Info MUST Have Contact URL","severity":"info","given":"$.info.contact","then":{"field":"url","function":"truthy"},"tags":["format:openapi","spec:info","experience:discoverability","experience:documentation"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'info-contact-require-url' (Info Contact Require URL). Requirement: Having a contact url associated with the technical contract ensures that anyone who comes across the API knows where to go to contact someone. To fix: Ensure `url` is present and non-empty at each matching location. This rule is evaluated at the JSONPath `$.info.contact` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"info-description":{"title":"Info Description","reference":"https://spotlight-rules.com/spec/rules/openapi/info-description/","source":"builtin","description":"Info \"description\" must be present and non-empty string.","message":"Info \"description\" must be present and non-empty string.","severity":"info","given":"$","then":{"field":"info.description","function":"truthy"},"tags":["format:openapi","spec:document","experience:documentation"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'info-description' (Info Description). Requirement: Info \"description\" must be present and non-empty string. To fix: Ensure `info.description` is present and non-empty at each matching location. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"info-description-length-limit":{"title":"Info Description Length Limit","reference":"https://spotlight-rules.com/spec/rules/openapi/info-description-length-limit/","source":"compiled","description":"Having a restriction on the length of the API description expressed as the OpenAPI info description helps provide constraints for consumers when adding a description, and keeps portals, landing pages, documentation, and discovery results more consistent.","message":"Info description MUST be less than 500 characters.","severity":"info","given":"$.info","then":{"field":"description","function":"length","functionOptions":{"max":500}},"tags":["format:openapi","spec:info","experience:documentation","experience:consistency"],"prompt":"You are editing an OpenAPI document to satisfy the Spotlight API governance rule 'info-description-length-limit' (Info Description Length Limit). Requirement: Having a restriction on the length of the API description expressed as the OpenAPI info description helps provide constraints for consumers when adding a description, and keeps portals, landing pages, documentation, and discovery results more consistent. To fix: Ensure the length of `description` is at most 500. This rule is evaluated at the JSONPath `$.info` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid OpenAPI. Return only the complete corrected document, with no commentary."},"info-description-no-eval-tag":{"title":"Info Description No Eval Tag","reference":"https://spotlight-rules.com/spec/rules/openapi/info-description-no-eval-tag/","source":"compiled","description":"Eval functions MUST not be included in the description of an API, keeping descriptions to just the text that is needed, and relying on the rest of the OpenAPI to describe what is possible.","message":"Info Description MUST NOT Have Eval Tag","severity":"info","given":"$.info","then":{"field":"description","function":"pattern","functionOptions":{"notMatch":"^\\b(\" tags.","message":"Markdown descriptions must not have \"