Skip to content

Add: Use AI to write custom OpenAPI lint rules - #369

Merged
adamaltman merged 2 commits into
Redocly:mainfrom
riboflavin:agent/learn-ai-for-docs-ai-write-custom-openapi-lint-rules-20260730
Aug 27, 2026
Merged

Add: Use AI to write custom OpenAPI lint rules#369
adamaltman merged 2 commits into
Redocly:mainfrom
riboflavin:agent/learn-ai-for-docs-ai-write-custom-openapi-lint-rules-20260730

Conversation

@riboflavin

Copy link
Copy Markdown
Contributor

Summary

  • Adds learn/ai-for-docs/ai-write-custom-openapi-lint-rules.md from the Calendar draft.
  • Updates learn/ai-for-docs/sidebars.yaml with the new page entry.

Test plan

  • Preview the page locally via npm start
  • Confirm sidebar label and SEO front matter
  • Spot-check internal links and How Redocly can help

@adamaltman
adamaltman marked this pull request as ready for review August 27, 2026 18:29
@adamaltman
adamaltman merged commit ccec7fe into Redocly:main Aug 27, 2026
1 check passed

@redocly redocly Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

marketing-site AI Review: 🟢 Completed

Redocly Agent has reviewed your changes and found 1 potential issue(s).

Note

Low Risk

This PR strictly contains documentation changes, adding a new article and its corresponding sidebar entry. There are no runtime code or behavior changes, meaning there is zero operational risk.

Overview

Adds a new guide, ai-write-custom-openapi-lint-rules.md, detailing how to use AI to draft custom OpenAPI lint rules for Redocly CLI. The article covers generating both YAML-based configurable rules and JavaScript-based custom rule plugins, providing examples, prompt templates, and best practices for testing new rules before enforcing them. Additionally, it updates learn/ai-for-docs/sidebars.yaml to include the new page in the navigation structure.

message: Error response schemas must list "code" as a required field so clients can branch on it
severity: error
assertions:
contains:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Severity: Medium

The contains assertion silently passes if the required property is missing entirely. Add defined: true to the main assertions block to fix this false negative. Also, consider adding a MediaType subject to where to avoid falsely flagging header schemas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants