Repository navigation
Add cURL and CLI code samples to the Management API reference - #3785
Merged
Merged
Conversation
The Management API reference used the code samples Mintlify generates. It now uses our own cURL samples, and the CLI samples of the same keys. The SDKs do not cover the Management API, so no other language is shown. - Add a cURL sample for each of the 27 Management API routes. - Generate assets/cloud-assets/meilisearch-cloud-openapi-mintlify.json with these samples, and use it in the navigation. - Check the Cloud file in CI: cURL coverage, Mintlify validation, and sample usage.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Management API reference used the code samples that Mintlify generates. It now shows our own samples: a cURL sample for every route, and a CLI sample when the CLI implements the route. No other language is shown, because the SDKs do not cover the Management API.
Based on #3694. The CLI samples come from meilisearch/cli#98.
Changes
.code-samples.meilisearch.yamlhas a cURL sample for each of the 27 routes, in a new## BEGIN /reference/management-apisection. Keys start withmanagement_. The line above each key is its route id, as for the Meilisearch API.npm run generate-mintlify-openapi-filealso writesassets/cloud-assets/meilisearch-cloud-openapi-mintlify.json, frommeilisearch-cloud-openapi.yaml. It keeps only the cURL and CLI samples. The navigation uses this file, and shows only thecurllanguage.openapi-code-samples-check.yml: every Management API route must have a cURL sample. The informational job also lists the routes without a CLI sample.post-deployment.yml: generates both Mintlify files, validates both withmint openapi-check, and commits each changed file.check-code-samples-usage: a route comment can name a route of either OpenAPI file.CONTRIBUTING.mdand thecurl-code-samplesandupdate-api-refskills explain the new section.The committed Mintlify file has no CLI sample yet: the CLI pull request is not merged. The post-deployment workflow adds them after it is merged.
🤖 Generated with Claude Code