-
Notifications
You must be signed in to change notification settings - Fork 0
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
OpenAPI Playground #27
Conversation
@@ -14,6 +14,7 @@ enum Command { | |||
|
|||
#[tokio::main] | |||
async fn main() -> Result<()> { | |||
dotenv::dotenv()?; |
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.
This causes ambiguous error when there's no .env
file:
$ target/debug/mina_mesh serve
Error: path not found
Caused by:
path not found
#[arg(env, long)] | ||
playground: bool, | ||
#[arg(env = "RUST_ENV", long)] | ||
rust_env: String, |
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.
I think that having --rust-env
as a required argument in the CLI is a bit unusual. I feel that just having --playground
alone (although with a brief explanation) for switching on the playground should be enough and --rust-env
could be removed entirely.
--playground
[env: PLAYGROUND=]
--rust-env <RUST_ENV>
[env: RUST_ENV=production]
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.
This is a very nice addition! I think that it would be nice to have a few words about it in the readme! :)
An interactive playground (a la Scalar) now visible on the root route via GET request.