Go to file
Michael Dowling 3485a2e9cf Remove allowing true for annotation traits
This commit removes the support for setting annotation traits to true
because the previous rationale for supporting that no longer holds true.
The previous rationale was that supporting `true` makes writing the AST
JSON files easier. However, we've already crossed the point where we
don't want humans writing the JSON AST, and we want it to be as easy to
parse as possible.

The AST format now requires that `{}` is provided for annotation traits.
The IDL no longer supports setting a trait to `true` or `null`, as that
was only supported in order to provide isomorphism with the AST support.
We previously didn't persist which model format a pending trait
definition came from, so it was necessary to give them the same feature
set. However, now the Smithy loader maintains a boolean value that tells
the loader whether or not a value is an "annotation", meaning trait with
no value. This isn't a feature used in the AST loader, but is used in
the IDL loader.

Further, the BooleanTrait abstract class was renamed to AnnotationTrait.
This is something I wanted to do for a long time, but never did since it
would cause so much churn, and the name wasn't that far off from what it
represents. However, now that `true` isn't supported for annotation
traits, the name BooleanTrait makes no sense. This commit renames it and
takes the BC hit because it's now worth it.
2020-04-21 17:15:05 -07:00
.github Create initial file from template 2019-03-23 13:14:06 -07:00
config Replace jackson-core with vendored minimal-json 2020-04-21 17:01:59 -07:00
docs Remove allowing true for annotation traits 2020-04-21 17:15:05 -07:00
gradle/wrapper Update to Gradle 5.4.1 2019-05-16 15:53:11 -07:00
smithy-aws-apigateway-openapi Remove allowing true for annotation traits 2020-04-21 17:15:05 -07:00
smithy-aws-apigateway-traits Remove allowing true for annotation traits 2020-04-21 17:15:05 -07:00
smithy-aws-iam-traits Remove allowing true for annotation traits 2020-04-21 17:15:05 -07:00
smithy-aws-protocol-tests Update externalDocumentation to a named map 2020-04-21 17:11:31 -07:00
smithy-aws-traits Remove allowing true for annotation traits 2020-04-21 17:15:05 -07:00
smithy-build Remove allowing true for annotation traits 2020-04-21 17:15:05 -07:00
smithy-cli Update smithy-build to use NodeMapper 2020-04-21 17:01:58 -07:00
smithy-codegen-core Add unstable, internal, and generated annotations 2020-04-21 17:01:58 -07:00
smithy-diff Make enum trait a list of structures 2020-04-21 17:01:59 -07:00
smithy-jsonschema Remove allowing true for annotation traits 2020-04-21 17:15:05 -07:00
smithy-linters Remove allowing true for annotation traits 2020-04-21 17:15:05 -07:00
smithy-model Remove allowing true for annotation traits 2020-04-21 17:15:05 -07:00
smithy-mqtt-traits Remove allowing true for annotation traits 2020-04-21 17:15:05 -07:00
smithy-openapi Remove allowing true for annotation traits 2020-04-21 17:15:05 -07:00
smithy-protocol-test-traits Update model version from 0.5.0 to 1.0.0 (#357) 2020-04-21 17:06:54 -07:00
smithy-utils Remove Triple from utils 2020-04-21 17:01:58 -07:00
.gitignore Initial code commit 2019-03-23 21:58:14 -07:00
.travis.yml Add log-tests project property 2020-01-08 21:39:36 -08:00
CHANGELOG.md Remove the smithy-codegen-freemarker package 2020-04-21 17:15:05 -07:00
CODE_OF_CONDUCT.md Create initial file from template 2019-03-23 13:14:06 -07:00
CONTRIBUTING.md Update contributing guide 2019-06-13 13:51:18 -07:00
LICENSE Create initial file from template 2019-03-23 13:14:06 -07:00
NOTICE Replace jackson-core with vendored minimal-json 2020-04-21 17:01:59 -07:00
README.md Make various improvements geared towards Gradle/CLI 2020-01-27 10:37:10 -08:00
build.gradle.kts Bump version to 1.0.0 2020-04-21 17:13:35 -07:00
gradle.properties Initial code commit 2019-03-23 21:58:14 -07:00
gradlew Initial code commit 2019-03-23 21:58:14 -07:00
gradlew.bat Initial code commit 2019-03-23 21:58:14 -07:00
mkdocs Automate documentation publishing 2019-07-24 13:05:51 -07:00
settings.gradle.kts Remove the smithy-codegen-freemarker package 2020-04-21 17:15:05 -07:00

README.md

Smithy

Build Status

Smithy is a protocol-agnostic interface definition language and set of tools for generating clients, servers, and documentation for any programming language.

NOTE: Smithy is a developer preview; we will continue to provide updates with new features, integrations, and fixes.

Modeling in Smithy

Smithy models define a service as a collection of resources, operations, and shapes.

namespace example.weather

service Weather {
  version: "2006-03-01",
  resources: [City],
  operations: [GetCurrentTime]
}

resource City {
  identifiers: { cityId: CityId },
  read: GetCity,
  list: ListCities,
  resources: [Forecast],
}

// See the full example at https://awslabs.github.io/smithy/quickstart.html#complete-example

Find out more about modeling a service with Smithy in the Quick Start guide.

Building Smithy models

The Smithy Gradle Plugin is the best way to get started with building a Smithy model. First, create a smithy-build.json file:

{
    "version": "1.0"
}

Then, apply the Smithy Gradle Plugin in your build.gradle.kts file and run gradle build:

plugins {
   id("software.amazon.smithy").version("0.4.3")
}

Find out more about building artifacts of your Smithy model in the Building Smithy Models guide.

License

This library is licensed under the Apache 2.0 License.