Skip to content
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

Merged
merged 5 commits into from
Sep 26, 2024
Merged

OpenAPI Playground #27

merged 5 commits into from
Sep 26, 2024

Conversation

harrysolovay
Copy link
Contributor

@harrysolovay harrysolovay commented Sep 26, 2024

An interactive playground (a la Scalar) now visible on the root route via GET request.

@harrysolovay harrysolovay changed the title Dockerizing and OpenAPI Playground OpenAPI Playground Sep 26, 2024
@harrysolovay harrysolovay merged commit 8190607 into main Sep 26, 2024
6 checks passed
@harrysolovay harrysolovay deleted the dockerizing branch September 26, 2024 16:32
@@ -14,6 +14,7 @@ enum Command {

#[tokio::main]
async fn main() -> Result<()> {
dotenv::dotenv()?;
Copy link
Collaborator

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

Comment on lines +26 to +29
#[arg(env, long)]
playground: bool,
#[arg(env = "RUST_ENV", long)]
rust_env: String,
Copy link
Collaborator

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]

Copy link
Collaborator

@piotr-iohk piotr-iohk left a 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! :)

@piotr-iohk piotr-iohk mentioned this pull request Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants