-
Notifications
You must be signed in to change notification settings - Fork 3
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
integrate Speakeasy generated code snippets directly into Mintlify #36
Draft
Coniferish
wants to merge
5
commits into
main
Choose a base branch
from
jj/sdk-code-snippets
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Coniferish
force-pushed
the
jj/sdk-code-snippets
branch
2 times, most recently
from
May 14, 2024 16:11
44cde13
to
7954af8
Compare
Coniferish
force-pushed
the
jj/sdk-code-snippets
branch
from
May 14, 2024 21:17
7954af8
to
10e3b5a
Compare
awalker4
pushed a commit
to Unstructured-IO/unstructured-python-client
that referenced
this pull request
May 17, 2024
Setup for integrating Speakeasy generated code snippets directly into our Mintlify docs repo https://www.speakeasyapi.dev/docs/mintlify#manual-setup Also see Unstructured-IO/docs#36
MKhalusova
requested changes
May 31, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay in reviewing this. Some notes:
- The SDK parameters, and code snippets should be a part of the API documentation, not a separate tab. The tabs are reserved for a) products, b) notebooks & code examples, c) glossary & FAQ. Let's not overcrowd that menu.
- The SDK link goes nowhere, it redirects to the index page
- What do the code examples look like? If we're only showing the API parameters and their description, we have them already listed under "Using Unstructured API | API Parameters". We could potentially automatically generate those. Or are these code snippets with examples? In this case it would make sense to add them to the "Using Unstructured API | Examples" page, with meaningful descriptions.
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.
This PR integrates Speakeasy's generated code snippet examples for the SDKa into Mintlify as described here
In the
unstructured-python-client
andunstructured-js-client
repos there arecodeSamples.yaml
files. This file in each repo is an overlay file that is used to modify an openapi specification. These files are generated through the workflow.yaml in the respective repo whenever the client is updated/speakeasy run
is used (see more here).In this repo,
workflow.yaml
andsdk_generation.yaml
files have been added and are used to create a finalopenapi_with_sdk_codeSamples.yaml
that contains code samples from both the js and python skds (this is also generated with the commandspeakeasy run
). This file can be used by Mintlify to create .mdx files with the commandnpx @mintlify/scraping@latest openapi-file openapi_with_sdk_codeSamples.yaml
.TODO:
The mdx file generated from
openapi_with_sdk_codeSamples.yaml
does not contain much and there may be an issue with how it is currently generated. When testing locally withmintlify dev
to preview changes, theSDK
tab appears, but does not load when clicked.