forked from smithy-lang/smithy
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update Repo #1
Merged
Merged
Update Repo #1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This make it a bit easier when all you care about is the name value pair.
This commit excludes linting enum and intEnum members for AbbreviationName and CamelCase checks, as they are intended to be CAPS_SNAKE.
* Fix cfn-mutability for inherited identifiers For resources with parent resources, identifiers that are inherited should be marked with create-and-read mutability instead of the defaults for that resource. This fixes that case, and adjusts the test cases to verify the correct behavior
* Correct a minor grammar mistake * Correct the Resource shape properties Type entry Prior to this change, the docs incorrectly list the Type as "AST shape reference", but as per the Description column, and the Model (not AST) docs, as well as the Introducing Smithy IDL 2.0 blog post, this Type should be a map of strings to shape ID. See: * https://awslabs.github.io/smithy/2.0/spec/service-types.html#resource * https://awslabs.github.io/smithy/2.0/spec/json-ast.html#resource-shape * https://aws.amazon.com/blogs/developer/introducing-smithy-idl-2-0/ * Correct the Resource shape's `properties` type It should be a map of AST shape references, as per #1415 (comment)
The integer type is a sort of vaugely supported thing in json schema, not jsut OpenAPI. So this moves that configuration up to the generic settings so it can also be applied to cloudformation and any future derivative tooling. The int32 / int64 formats were kept to openapi since that *isn't* referenced in the the json schema spec.
* Add coverage for `intEnum` in all protocol tests As part of IDL 2.0, the `intEnum` shape was added. The following changes add several test cases using an `intEnum` shape (and/or aggregates) under the `awsJson1_*`, *Query, and `RestXml` protocol test suites.
Validator for missing sensitive trait
This commit fixes docs so that they don't emit warnings and will now fail doc builds on nitpicky documentation warnings.
…on1` The spec already allows for an error response to containe the full Shape ID (including namespace), but this wording makes it clearer.
Previously, it was possible to refer to a trait marked with `@private` from another namespace. This commit makes doing this cause a warning. A warning is used instead of an error to maintain backward compatibility, but it will be upgraded to an error in the future.
* Fix return type of substring method * Add test & refactor tests that load resources * Use try-with-resources
MapMembers grammar was incorrectly stating a BR was required between the key and value, but actually WS is required. This was already reflected in the implementation, and the previous grammar was at odds with being able to use a comma to separate the key and value members. I added a new test case for 2.0 models and map parsing. Closes #1511
Signed-off-by: Daniele Ahmed <[email protected]>
Prior to this PR, class caching mechanisms in DefaultNodeDeserializers and DefaultNodeSerializers would cache classes the first time they were loaded. If the class was loaded again using a new ClassLoader, and then retrieved from the cache, there would be a mismatch in the loaded class and the one retrieved from the cache because class equality is dependent on the ClassLoader used. This caused class cast exceptions in the language server. Based on discussion with Michael offline, this PR introduces a modified caching mechanism that associates a key-value pair with an instance of a loaded class. When retrieving a value from the cache, the associated class is also provided, and the cache will be invalidated if the associated class is not referentially equal to the currently cached class. This modified caching mechanism replaces caches in DefaultNodeSerializers and DefaultNodeDeserializers. Testing ------ - Test class for the new caching mechanism - Added test case to ModelAssemblerTest for loading external jars with trait implementations multiple times. The jar and model used for this test case was taken from the language server.
* Add tests for ACCEPT * * Replace tabs with spaces * Remove body from requests
This commit changes the way `CreateDedicatedInputOutput` transform checks for singular references to a shape being used as input or output in an operation. It now checks to make sure the shape is only referenced by the specified operation. This fixes an edge case where a shape was being used as both the input and output for an operation, and would be left unused in the model after the transformation was applied. Two new test cases were added to verify the behavior when a shape is used as both input and output. Fixes: #1373
Grammar no longer requires a trailing line break after shape bodies, only between shapes. Also, list and map members are now optional because in IDL 2 they can be mixed in.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.