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

feat: list example files in new command help message #758

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

AnishKacham
Copy link
Contributor

Description

  • Give a list of available example files present in assets/examples folder
    in the new help command.
  • Add example usage for the new help command

Behaviour:

$ ./bin/run new --help
Creates a new asyncapi file

USAGE
  $ asyncapi new [-h] [-n <value>] [-e <value>] [-s] [-p <value>] [--no-tty]

FLAGS
  -e, --example=<value>
      name of the example to use. Available examples are:
        - simple.yml
        - anyof.yml
        - application-headers.yml
        - correlation-id.yml
        - websocket-gemini.yml
        - gitter-streaming.yml
        - mercure.yml
        - not.yml
        - operation-security.yml
        - oneof.yml
        - rpc-client.yml
        - rpc-server.yml
        - slack-rtm.yml
        - tutorial.yml
        - streetlights-kafka.yml
        - streetlights-operation-security.yml
        - streetlights-mqtt.yml

  -h, --help
      Show CLI help.

  -n, --file-name=<value>
      name of the file

  -p, --port=<value>
      port in which to start Studio

  -s, --studio
      open in Studio

  --no-tty
      do not use an interactive terminal

DESCRIPTION
  Creates a new asyncapi file

EXAMPLES
  $ asyncapi new         - start creation of a file in interactive mode

  $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty      - create a new file with a specific name, using one of the examples and without interactive mode

COMMANDS
  new file     Creates a new asyncapi file
  new glee     Creates a new Glee project
  new project  Creates a new Glee project

Related issue(s)
Fixes #162

@AnishKacham AnishKacham changed the title feat: list examples files in new command help message feat: list example files in new command help message Aug 14, 2023
@AnishKacham
Copy link
Contributor Author

@Souvikns @derberg Could you please review this one final time?

@Souvikns
Copy link
Member

@AnishKacham can you check if you have some lint issues?

@AnishKacham
Copy link
Contributor Author

@Souvikns fixed them :3

@sonarcloud
Copy link

sonarcloud bot commented Aug 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@Souvikns Souvikns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@AnishKacham
Copy link
Contributor Author

/rtm

@asyncapi-bot asyncapi-bot merged commit 5d34829 into asyncapi:master Aug 21, 2023
11 checks passed
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.54.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve help message with list of available examples
3 participants