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

Clarify that metadata has no namespace #1521

Merged
merged 1 commit into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/source-1.0/spec/core/idl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,28 @@ The following example defines metadata in the model:
}
}

Metadata is not defined within a namespace. Unquoted object property values
are considered :ref:`syntactic shape IDs <syntactic-shape-ids>` and resolve
to the prelude namespace, ``smithy.api``.

The following Smithy IDL model:

.. code-block:: smithy

$version: "1.0"
metadata exampleSyntacticShapeId = required

Is equivalent to the following JSON AST model:

.. code-block:: json

{
"smithy": "1.0",
"metadata": {
"exampleSyntacticShapeId": "smithy.api#required"
}
}


-------------
Shape section
Expand Down
23 changes: 23 additions & 0 deletions docs/source-2.0/spec/idl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ The following example defines metadata in the model:

.. code-block:: smithy

$version: "2"
metadata greeting = "hello"
metadata "stringList" = ["a", "b", "c"]

Expand All @@ -405,6 +406,28 @@ The following example defines metadata in the model:
}
}

Metadata is not defined within a namespace. Unquoted object property values
are considered :ref:`syntactic shape IDs <syntactic-shape-ids>` and resolve
to the prelude namespace, ``smithy.api``.

The following Smithy IDL model:

.. code-block:: smithy

$version: "2"
metadata exampleSyntacticShapeId = required

Is equivalent to the following JSON AST model:

.. code-block:: json

{
"smithy": "2",
"metadata": {
"exampleSyntacticShapeId": "smithy.api#required"
}
}


-------------
Shape section
Expand Down