Skip to content

Add request examples to Foundry OpenAPI spec#19

Merged
anand-testcompare merged 1 commit intomainfrom
feat/openapi-request-examples
Feb 15, 2026
Merged

Add request examples to Foundry OpenAPI spec#19
anand-testcompare merged 1 commit intomainfrom
feat/openapi-request-examples

Conversation

@anand-testcompare
Copy link
Collaborator

@anand-testcompare anand-testcompare commented Feb 15, 2026

Why\nFoundry's compute module function UI currently generates a generic placeholder payload (e.g. "complaint": "value") even though our Pydantic schemas include realistic examples.\n\n## What changed\n- When generating the Foundry-constrained OpenAPI spec, copy schema-level example into requestBody.content.application/json.example when the request schema is a .\n- This improves the default sample request shown for functions registered from the OpenAPI label.

Summary by CodeRabbit

Release Notes

  • Documentation
    • Enriched API documentation with example payloads for multiple request endpoints.
    • Added sample complaint data to component schemas to provide clearer developer guidance.
    • Includes practical, real-world examples to streamline API integration, adoption, and testing.

Populate requestBody media-type examples from schema examples so the compute module function UI shows realistic sample payloads instead of generic string placeholders.
@railway-app railway-app bot temporarily deployed to dspy-reference-example / dspy-reference-examples-pr-19 February 15, 2026 03:47 Destroyed
@railway-app
Copy link

railway-app bot commented Feb 15, 2026

🚅 Deployed to the dspy-reference-examples-pr-19 environment in dspy-reference-example

Service Status Web Updated (UTC)
dspy-reference-examples ✅ Success (View Logs) Web Feb 15, 2026 at 3:48 am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 15, 2026

Walkthrough

This pull request enhances OpenAPI documentation by adding example payloads to three request types (AEPCRequest, AECategoryRequest, PCCategoryRequest) and implements automatic example propagation in the deployment script to copy schema-level examples into request media when inline examples are absent.

Changes

Cohort / File(s) Summary
OpenAPI Specification Examples
openapi.foundry.json
Added example fields to requestBodies and corresponding schema definitions for AEPCRequest, AECategoryRequest, and PCCategoryRequest with sample complaints.
Normalization Logic Enhancement
scripts/deploy/foundry_openapi.py
Extended _normalize_operation() with optional schemas parameter and added logic to inspect request bodies and automatically copy examples from referenced component schemas when inline examples are missing.

Poem

🐰 With whiskers twitching and a hop so grand,
Examples bloom throughout the land,
Where schemas dance with payloads true,
OpenAPI shines with clearer view!
✨ A well-documented dream come through!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding request examples to the Foundry OpenAPI specification, which matches the core objective of copying schema examples into requestBody.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/openapi-request-examples

No actionable comments were generated in the recent review. 🎉


Comment @coderabbitai help to get the list of available commands and usage tips.

@anand-testcompare anand-testcompare merged commit ecfa78a into main Feb 15, 2026
8 checks passed
@anand-testcompare anand-testcompare deleted the feat/openapi-request-examples branch February 15, 2026 03:53
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.

1 participant