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

Series 0.15.0 mega PR #379

Merged
merged 45 commits into from
Aug 18, 2022
Merged

Series 0.15.0 mega PR #379

merged 45 commits into from
Aug 18, 2022

Conversation

Baccata
Copy link
Contributor

@Baccata Baccata commented Aug 18, 2022

  • Adds support for smithy 2.0
  • Adds support for custom refinements

lewisjkl and others added 30 commits August 2, 2022 10:02
* Revised bijection/surjection schema

* Deleted "Isomorphism" in favour of a new "Bijection" construct
* Changed the Refinement construct to also hold the reverse function
* Changed the BijectionSchema and SurjectionSchema constructs to hold
respectively the Bijection and Surjection

* Rename Surjection to Refinement
Fix Scala 3 code

* Rename Validator to RefinementProvider

* Add smart constructors

* add example/smoke test for refined

* add java trait for refined; filter out canonical shapes

* update renderer to work with refined types

* update how refined/validated are rendered

* rm hints when they are captured by refined/validated

* working with list, set, map

* lock down refinements to simple or collection shapes

* disallow constrained shapes

* refactor decl method back to option

* fix tests compilation issue

* add headers

* fix json test compile errors

* Removed FieldValidator construct

* Addressing comments

* add unwrap trait with example spec

* unwrap working in structure

* unwrapping of collections

* add docs

* make refinement provider implicit

* Using PartiallyApplied pattern for refinement

* update examples

Co-authored-by: Olivier Mélois <olivier.melois@disneystreaming.com>
Co-authored-by: Olivier Mélois <baccata64@gmail.com>
Update to smithy 2.0; add int enum support
Now, when a client gets an unsuccessful response from a server, it'll
try to inspect the X-Error-Type header first, and then will try to match
the received status code against the errors it knows about
(provided the code in question is uniquely used)

If the client cannot infer a unique alternative based on this
information, it'll raise a generic "UnknownErrorResponse"
first pass at using mixins to create traits
Smithy 2.0 syntax is released in the 1.23.0 artifact
A new ADT LineSegment has been introduced.
This facilitates name and type ref collision detection between types defined in Smithy and types that are part of the core code generated.
It also brings in a more intuitive reading of the core scala code template that is used for code generation
Baccata and others added 15 commits August 17, 2022 11:56
* Add the logic to render default parameters

* Handle unwrapped parameters, add comments

* Drop Hint.* import, makes code clearer

* Protect ref name

Co-authored-by: David Francoeur <dfrancoeur04@gmail.com>
currently, the error message is too terse. the most crucial
piece of information to debug this kind of issue is hidden away.

instead of `Missing required field`, we get `Missing required field
at .thing[1].someName`
add default support in several locations
@Baccata Baccata merged commit b96cc5b into main Aug 18, 2022
@Baccata Baccata deleted the 0.0.15 branch September 16, 2022 08:27
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.

None yet

5 participants