-
Notifications
You must be signed in to change notification settings - Fork 671
Mastra server.build
config for swaggerUI, openAPIDocs, apiReqLogs
#3674
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
Mastra server.build
config for swaggerUI, openAPIDocs, apiReqLogs
#3674
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
🦋 Changeset detectedLatest commit: c54f9c2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 54 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📝 Documentation updates detected! You can review documentation updates here |
Hey @TheIsrael1 - I tried to do something similar in #3641. Also not a contributor [yet 😄] so I probably don't have enough context but still gonna throw some comments - hopefully some of them are useful
|
…ling-playgroundswagger-ui-at-build-time
📝 Documentation updates detected! You can review documentation updates here |
@@ -82,6 +82,36 @@ You can then leverage the [Mastra Client](/docs/deployment/client) SDK to intera | |||
|
|||
`mastra dev` provides an OpenAPI spec at http://localhost:4111/openapi.json | |||
|
|||
To enable OpenAPI documentation in your Mastra instance, add the following configuration: |
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.
We should probably always enable all of these on dev and only read the config on production builds
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.
oh ok, we can do that, we can have a build property on the server config
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.
ok we have a server.build config now that applies if !isDev in the hono server
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.
Hi @TheIsrael1 . Could you help me understand if I'm using this wrong? It tried these options on a production build, but they are not being respected. Following the built code I noticed it's calling await createNodeServer(mastra);
without options, and inside it there's a call for const app = await createHonoServer(mastra, options);
, which makes it look like these options under Mastra.server.build
are not being read. Do I need to set something else? Also, would it make sense to also keep the playground
option?
…ling-playgroundswagger-ui-at-build-time
Braintrust eval reportNo experiments to report |
…ling-playgroundswagger-ui-at-build-time
server.build
config for swaggerUI, openAPIDocs, apiReqLogs
Description
Related Issue(s)
Type of Change
Checklist