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

Check and validate JSON schema #1509

Merged
merged 13 commits into from
Aug 28, 2022

Conversation

ashutoshpw
Copy link
Contributor

This will check for a valid JSON schema on every push and PR request to the repository.

Schema Definition is located in
tools/schema/chainSchema.json

@ashutoshpw
Copy link
Contributor Author

@ligi , I have added following params as required in the JSON field "name","chain","rpc","nativeCurrency","chainId","networkId"

Do you think any other field in the JSON is required?

@ligi
Copy link
Member

ligi commented Aug 28, 2022

you can see all I see as mandatory here:

@ashutoshpw
Copy link
Contributor Author

Adding a Regex definition in chainSchema.json would also solve this issue. #610 . shortName in 19 files needs to be fixed if we use the regex ^[A-Za-z0-9-_]+$ to allow alpha-numeric characters without space.

@ashutoshpw ashutoshpw marked this pull request as ready for review August 28, 2022 09:56
@ligi ligi merged commit bf8ce68 into ethereum-lists:master Aug 28, 2022
@ashutoshpw ashutoshpw deleted the chore/validate-json branch August 28, 2022 10:26
hoanguyenkh pushed a commit to AstraProtocol/chains that referenced this pull request Aug 29, 2022
* Validate json

* wip: gh workflow test

* wip: added workflow for JSON validation

* Schema Improved.

* Improved Workflow and Schema check for JSON files

* Fixed JSON Schema

* Fixed typo

* Removed auto generated file

* updated required fields in chainSchema

* updated chain schema

* removed `network` from README.md example

* improved schemaCheck script

* Matching ChainID with file name schema.
hoanguyenkh pushed a commit to AstraProtocol/chains that referenced this pull request Aug 29, 2022
* Validate json

* wip: gh workflow test

* wip: added workflow for JSON validation

* Schema Improved.

* Improved Workflow and Schema check for JSON files

* Fixed JSON Schema

* Fixed typo

* Removed auto generated file

* updated required fields in chainSchema

* updated chain schema

* removed `network` from README.md example

* improved schemaCheck script

* Matching ChainID with file name schema.
@AlecoDigitalCreator
Copy link

This will check for a valid JSON schema on every push and PR request to the repository.

Schema Definition is located in
tools/schema/chainSchema.json

Copy link

@jonesk7734 jonesk7734 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Daniel182020
Copy link

👍

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.

5 participants