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

adding schemas-cli-examples #8985

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

onkabes
Copy link

@onkabes onkabes commented Oct 17, 2024

Issue #, if available:

Description of changes:

Adding example CLI commands for Amazon EventBridge Schemas: https://docs.aws.amazon.com/cli/latest/reference/schemas/

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@elysahall elysahall self-requested a review October 21, 2024 16:23
@elysahall elysahall self-assigned this Oct 21, 2024
@elysahall elysahall added documentation This is a problem with documentation. pr:work-in-progress This PR is a draft and needs further work. labels Oct 21, 2024
Copy link
Collaborator

@elysahall elysahall left a comment

Choose a reason for hiding this comment

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

@onkabes
Thank you for your submission! There were a few issues that affected all of your examples, such as fixing your indententation. Please fix these formatting issues and push your updates.


The following ``create-discoverer`` creates a discoverer. ::

aws schemas create-discoverer \
Copy link
Collaborator

Choose a reason for hiding this comment

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

All your examples are using tab indenting. Indents should be exactly 4 spaces per level of indentation. Please update all your examples to use 4 space indenting.
https://aws.github.io/aws-cli/docs_styleguide.html#general

@@ -0,0 +1,20 @@
**To create a discoverer**

The following ``create-discoverer`` creates a discoverer. ::
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The following ``create-discoverer`` creates a discoverer. ::
The following ``create-discoverer`` example creates a discoverer. ::

All your examples need to be updated to include the expression:
The following ``command-name`` example...
https://aws.github.io/aws-cli/docs_styleguide.html#description

@@ -0,0 +1,8 @@
**To delete a discoverer**

The following ``delete-discoverer`` deletes a discoverer. If the command succeeds, no output is returned. ::
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The following ``delete-discoverer`` deletes a discoverer. If the command succeeds, no output is returned. ::
The following ``delete-discoverer`` deletes a discoverer. ::

For commands that produce no output, use the following line after the command and update all your examples to follow this format:

This command produces no output.

https://aws.github.io/aws-cli/docs_styleguide.html#command-produces-no-output


aws schemas delete-discoverer \
--discoverer-id example-discoverer-name

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
This command produces no output.

The following ``get-discovered-schema`` retrieves the discovered schema that was created by the Schemas service based on a sample event. ::

aws schemas get-discovered-schema \
--events "{\"Source\":\"com.mycompany.myapp\",\"Detail\":\"{ \\\"key1\\\": \\\"value1\\\", \\\"key2\\\": \\\"value2\\\" }\",\"EventBusName\":\"default\",\"Resources\":[\"resource1\",\"resource2\"],\"DetailType\":\"myDetailType\"}" \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Quotation rules for command examples must use unix-like formatting rules. This means using single quotes and unescaping your double quotes similar to the following:

Suggested change
--events "{\"Source\":\"com.mycompany.myapp\",\"Detail\":\"{ \\\"key1\\\": \\\"value1\\\", \\\"key2\\\": \\\"value2\\\" }\",\"EventBusName\":\"default\",\"Resources\":[\"resource1\",\"resource2\"],\"DetailType\":\"myDetailType\"}" \
--events '{"Source":"com.mycompany.myapp","Detail":"{ \\"key1\\": \\"value1\\", \\"key2\\": \\"value2\\" }","EventBusName":"default","Resources":["resource1","resource2"],"DetailType":"myDetailType"}' \

Please update all examples not following these rules.
https://aws.github.io/aws-cli/docs_styleguide.html#command

@@ -0,0 +1,15 @@
**To retrieve the discovered schema that was created by the Schemas service based on a sample event.**
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
**To retrieve the discovered schema that was created by the Schemas service based on a sample event.**
**To retrieve the discovered schema that was created by the Schemas service based on a sample event**

@@ -0,0 +1,19 @@
**To list all the existing registries**

The following ``list-registries`` lists all the existing registries. You may use the --registry-name-prefix flag to narrow down the results. The command will return all registries by default, but you may narrow the results using the --scope flag to narrow down the results to custom or AWS managed registries. ::
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The following ``list-registries`` lists all the existing registries. You may use the --registry-name-prefix flag to narrow down the results. The command will return all registries by default, but you may narrow the results using the --scope flag to narrow down the results to custom or AWS managed registries. ::
The following ``list-registries`` lists all the existing registries. You may use the ``--registry-name-prefix`` option to narrow down the results. The command will return all registries by default, but you may narrow the results using the ``--scope`` option to narrow down the results to custom or AWS managed registries. ::

@@ -0,0 +1,22 @@
**To list all the existing schemas available in a registry**

The following ``list-schemas`` lists all the existing schemas available in a registry. You may optionally use the --schema-name-prefix to narrow down the results. ::
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The following ``list-schemas`` lists all the existing schemas available in a registry. You may optionally use the --schema-name-prefix to narrow down the results. ::
The following ``list-schemas`` lists all the existing schemas available in a registry. You may optionally use the ``--schema-name-prefix`` option to narrow down the results. ::

@@ -0,0 +1,20 @@
**To create a new code biding source URI for a particular schema version in the language specified**
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
**To create a new code biding source URI for a particular schema version in the language specified**
**To create a new code binding source URI for a particular schema version in the language specified**

@@ -0,0 +1,20 @@
**To create a new code biding source URI for a particular schema version in the language specified**

The following ``put-code-binding`` creates a new code biding source URI for a particular schema version in the language specified. ::
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The following ``put-code-binding`` creates a new code biding source URI for a particular schema version in the language specified. ::
The following ``put-code-binding`` creates a new code binding source URI for a particular schema version in the language specified. ::

@elysahall elysahall removed their assignment Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. pr:work-in-progress This PR is a draft and needs further work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants