Skip to content

Add JSON schema validation to the GH API responses #27

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

Merged
merged 3 commits into from
Dec 5, 2024

Conversation

UlisesGascon
Copy link
Member

@UlisesGascon UlisesGascon commented Dec 5, 2024

Main Changes

  • Add json schema validation to the GH API responses (42decf6)
  • Improve schema errors for human readability (f3897c9)
  • Align the GitHub schema to the current API responses (6acb57c)

Screenshots

This is the new and more friendly approach to showcase the errors:

Screenshot from 2024-12-05 09-45-39

Format: `[ERROR: ${error.keyword}]${error.schemaPath}: ${error.message}`
Example: Error running workflow: Error when validating the Github org response from API: [ERROR: type]#/properties/location/type: must be string

Changelog

@UlisesGascon UlisesGascon self-assigned this Dec 5, 2024
@UlisesGascon UlisesGascon added this to the Database Migration milestone Dec 5, 2024
@UlisesGascon UlisesGascon changed the title Add json schema validation to the GH API responses Add JSON schema validation to the GH API responses Dec 5, 2024
@UlisesGascon UlisesGascon merged commit eea9838 into main Dec 5, 2024
1 check passed
@UlisesGascon UlisesGascon deleted the feat/add-gh-response-validation branch December 5, 2024 08:52
@UlisesGascon UlisesGascon mentioned this pull request Dec 9, 2024
43 tasks
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.

1 participant