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

Add support for formatting output of cloud apps list and cloud apps info #212

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ThorstenHans
Copy link
Contributor

This PR adds the --format flag (values Plain & Json) to the following commands:

  • spin cloud apps list
  • spin cloud apps info <app_name>

The enum contains the Plain variant (which is also set as default value for both commands) due to backward compatibility reasons.

Signed-off-by: Thorsten Hans <[email protected]>
src/commands/apps_output.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@itowlson itowlson left a comment

Choose a reason for hiding this comment

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

The functionality looks fine but there are some style things I'd really like to address if possible - sorry

src/commands/apps_output.rs Outdated Show resolved Hide resolved
src/commands/apps_output.rs Outdated Show resolved Hide resolved
src/commands/apps.rs Outdated Show resolved Hide resolved
src/commands/apps.rs Outdated Show resolved Hide resolved
src/commands/apps_output.rs Outdated Show resolved Hide resolved
src/commands/apps_output.rs Outdated Show resolved Hide resolved
src/commands/apps_output.rs Show resolved Hide resolved
src/commands/apps_output.rs Outdated Show resolved Hide resolved
src/commands/apps_output.rs Outdated Show resolved Hide resolved
src/commands/apps_output.rs Outdated Show resolved Hide resolved
@ThorstenHans
Copy link
Contributor Author

Thanks for the reviews @vdice and @itowlson

trying to mimic the behavior we have in place for plain text for json wasn't the smartest idea. I changed the way AppInfo is created and went with a simple String for Description instead of an Option it feels more natural to have a constant schema in JSON.

Thanks once again @itowlson for all those great suggestions 💪🏻

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.

3 participants