Skip to content

Add x-sap-ai-hint extension#41

Open
Fannon wants to merge 7 commits into
mainfrom
add-ai-hint-extension
Open

Add x-sap-ai-hint extension#41
Fannon wants to merge 7 commits into
mainfrom
add-ai-hint-extension

Conversation

@Fannon
Copy link
Copy Markdown
Member

@Fannon Fannon commented May 12, 2026

Added

  • x-sap-ai-hint extension for Info Object, Tag Object, Operation Object, Parameter Object, and Schema Object.
    • Provides a hint for AI consumers (e.g., LLMs) on how to use or interpret the annotated element, intentionally kept separate from human-readable description fields so that end-user-facing documentation and AI-targeted guidance can evolve independently.

Also adding CHANGELOG.md and retroactively the changes

@Fannon Fannon requested a review from pavelkornev May 12, 2026 12:57
@Fannon Fannon self-assigned this May 12, 2026
}
},
{
"paths": [
Copy link
Copy Markdown
Member Author

@Fannon Fannon May 12, 2026

Choose a reason for hiding this comment

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

Intended to have both: Different casing in OpenAPI 2 vs 3

- **Complementary** — when a `description` exists for human readers, use `x-sap-ai-hint` to add AI-specific context that would clutter or be out of place in the human-facing description: routing guidance, preconditions, side effects, related operations, or disambiguation against similar elements.
- **Standalone** — when no `description` is present (common for internal or machine-generated APIs), `x-sap-ai-hint` can serve as the sole description, written entirely for AI consumption rather than end-user documentation.

In both cases, the content should be optimized for an AI agent that needs to decide *whether* and *how* to use the element — not for a developer reading reference docs.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

should we explicitly allow support for markdown content? If we plan to concentrate guidance on a single extension field it would be beneficial to allow such format to enable rich structures

Copy link
Copy Markdown
Member Author

@Fannon Fannon May 28, 2026

Choose a reason for hiding this comment

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

Good idea, we can explicitly call out that this MAY or SHOULD be markdown. In the end, it will be text in LLM context, but we know that LLMs understand markdown well - so it's a good recommendation

Comment thread sap-schemas/v2.0/README.md
Fannon and others added 2 commits May 29, 2026 20:22
Co-authored-by: Juan Aguado <juan.aguado.calvo@gmail.com>
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