-
Notifications
You must be signed in to change notification settings - Fork 275
Generated API references from OpenAPI file #3446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
4d410d7
initial tests
guimachiavelli e06ca2c
add overview
guimachiavelli 3b5e21e
set references to top level for easier debugging
guimachiavelli 6a8e260
Update code samples [skip ci]
github-actions[bot] 2c4d9b2
add openapi file with code samples
guimachiavelli beb52ed
Add other languages
curquiza 24fe5a1
Remove example in docs.json
curquiza ac611b8
Add the newly and corrected open api file
curquiza f6a2e86
Remove useless files
curquiza 25080a3
New file for tests
curquiza 7d51227
Update code samples [skip ci]
github-actions[bot] 5ea50d9
Fix GitHub typo
curquiza f3db9a3
Add right file for tests
curquiza 0ce73a4
Add overview and errors page done by gui
curquiza 1639923
Change name of section
curquiza d0b04b8
Test CI with no node version
curquiza 37cd99f
Fix link
curquiza e10d43c
Test CI
curquiza 84b99c8
Update open api section
curquiza fea8053
First version of open api CI
curquiza b99767f
v2 of CI
curquiza b7c0f78
Add CI to check code samples and open api file
curquiza 9fb04cc
Update script to pull code samples
curquiza ef7f2e9
Add pull request template
curquiza 0efbf30
Add CI to check validity of SDK code samples for docs
curquiza 30356a7
Update code samples CI
curquiza f32b4a3
Add missing assets
curquiza ae0b436
Remove useless CI
curquiza 50a4db3
Remove useless files
curquiza 007fec5
Rename a job in CI
curquiza d52174b
Add name to CI job
curquiza 36e694f
Make post deployment work on every commit on main
curquiza d0e1915
Improve CI for code samples
curquiza 587c4ca
Make CI fetch only 1 open-api-file
curquiza 389d747
Add code sample for /fields route
curquiza 9c1470e
Add script to generate open-api-file for mintlify
curquiza f9876b3
Add script to package.json
curquiza 069bb2b
Fix code samples import
curquiza f82f839
Rename script
curquiza e4a4190
Add new openAPI files
curquiza 42b662b
Add CI to generate new mintlify open API file
curquiza eefd9fc
Remove old tip for authentication
curquiza b3f19fb
Add openAPI files
curquiza 702b64b
Use appropriate URL for API + make Guides section down
curquiza 9b28ecc
Fix link in docs
curquiza dcff2fe
Fix error indentations
curquiza 103b430
Change following review
curquiza 456d948
Fix typo in code samples
curquiza 64d032e
Add installation of node module to CI
curquiza 07ddd78
Improve CI following reviews
curquiza a7aea22
Add npm ci
curquiza 6022329
Fix first links
curquiza 8eb716c
Fix CIs
curquiza File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| ## Description | ||
|
|
||
| <!-- Describe the changes and purpose of the PR --> | ||
|
|
||
| ## Checklist | ||
|
|
||
| For internal Meilisearch team member only: | ||
| - [ ] I checked and followed our [internal guidelines](https://www.notion.so/meilisearch/Updating-docs-for-engineers-3034b06b651f808da3c6c4f5e34914fc?source=copy_link) | ||
| - [ ] ⚠️ I updated the code samples according to our [internal guidelines](https://www.notion.so/meilisearch/Updating-docs-for-engineers-3034b06b651f808da3c6c4f5e34914fc?source=copy_link#3034b06b651f8026bd63cfa294dfa0c6) | ||
|
|
||
| For external maintainers | ||
| - [ ] Did you use any AI tool while implementing this PR (code, tests, docs, etc.)? If yes, disclose it in the PR description and describe what it was used for. AI usage is allowed when it is disclosed. | ||
| - [ ] Have you made sure that the title is accurate and descriptive of the changes? | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # On every push to main, check meilisearch-openapi-mintlify.json for code samples: | ||
| # - Job 1: Ensure every route that has x-codeSamples includes a cURL sample (can fail). | ||
| # - Job 2: Informational only – list routes and all missing code sample languages (never fails). | ||
| name: OpenAPI code samples check | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| # Fails if any route with x-codeSamples has no cURL sample. | ||
| require-curl-samples: | ||
| name: Require cURL in x-codeSamples | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "20" | ||
| cache: "npm" | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install | ||
|
|
||
| - name: Check routes have cURL in x-codeSamples | ||
| run: | | ||
| npm run check-openapi-code-samples -- curl-check assets/open-api/meilisearch-openapi-mintlify.json | ||
|
|
||
| # Informational only: list routes and missing code sample languages. | ||
| # This job never fails the workflow (information check only). | ||
| info-missing-code-samples: | ||
| name: "[Info only - never fails] Missing code samples per route" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "20" | ||
| cache: "npm" | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install | ||
|
|
||
| - name: List routes and missing code samples (informational, never fails) | ||
| run: | | ||
| npm run check-openapi-code-samples -- info assets/open-api/meilisearch-openapi-mintlify.json || true | ||
|
curquiza marked this conversation as resolved.
|
||
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.