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

fix(error-equals): update error equals schemas to have the correct syntax #55

Merged

Conversation

Crazyglue
Copy link
Contributor

@Crazyglue Crazyglue commented Aug 12, 2020

Here is the syntax for declaring string[] in json schema: https://json-schema.org/understanding-json-schema/reference/array.html

The current definitions before this change would produce a schema that was an array of objects. { [key: string]: any }[] when used with the https://github.com/bcherny/json-schema-to-typescript package

The current schemas dont seem to be used in the repo anywhere, and definitely not in the tests, so this wouldnt have been caught here. However the downstream package asl-types does depend on these schemas, which is where i saw this issue.

I have validated in that package that changing items -> item did in fact fix the conversion process.

Here is the issue created in that package fourTheorem/asl-types#7

And here are the docs for ErrorEquals https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html

@codecov
Copy link

codecov bot commented Aug 12, 2020

Codecov Report

Merging #55 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #55   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           41        41           
=========================================
  Hits            41        41           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a9b7d6...b8e7190. Read the comment docs.

@ChristopheBougere ChristopheBougere merged commit 63aecd1 into ChristopheBougere:master Aug 13, 2020
@ChristopheBougere
Copy link
Owner

Thank you for the very well detailed bug report and fix @Crazyglue 👌
I just added a test to check that we weren't validating item types on master, and released a v1.7.1

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

2 participants