Skip to content

Validate Mintlify slugs across OpenAPI specs#781

Draft
danielporterda wants to merge 1 commit into
mainfrom
openapi-slug-validation-all-specs
Draft

Validate Mintlify slugs across OpenAPI specs#781
danielporterda wants to merge 1 commit into
mainfrom
openapi-slug-validation-all-specs

Conversation

@danielporterda

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #780. Extend the Mintlify-safe OpenAPI summary handling and validation across every published OpenAPI spec under docs-main/openapi, not just the Splice Token Metadata regression case.

Changes

  • Teach the JSON Ledger API OpenAPI generator to normalize existing path-only summaries, not only missing summaries, so pulled OpenAPI specs with GET /path/{param} summaries are rewritten to GET /path/:param before Mintlify sees them.
  • Add scripts/validate_mintlify_openapi_slugs.py and npm run validate:mintlify-openapi-slugs to scan all published OpenAPI specs for Mintlify-style operation route collisions.
  • Update JSON API OpenAPI tests to cover path-only summary normalization while preserving descriptive summaries.

Regeneration

Ran both OpenAPI generation paths:

  • direnv exec . npm run generate:json-api-reference
  • direnv exec . npm run generate:splice-mintlify-openapi

No additional generated output changes were produced on top of current main / #780.

Validation

  • direnv exec . npm run validate:mintlify-openapi-slugs (12 specs)
  • direnv exec . python3 -m pytest tests/test_json_api_openapi.py tests/test_splice_mintlify_openapi.py
  • direnv exec . npm run validate:splice-mintlify-openapi-nav
  • direnv exec . python3 -m py_compile scripts/generate_json_api_reference.py scripts/generate_splice_mintlify_openapi.py scripts/validate_splice_mintlify_openapi_nav.py scripts/validate_mintlify_openapi_slugs.py
  • direnv exec . git diff --check

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