Skip to content

Add JSON schema validation to the GH API responses#27

Merged
UlisesGascon merged 3 commits intomainfrom
feat/add-gh-response-validation
Dec 5, 2024
Merged

Add JSON schema validation to the GH API responses#27
UlisesGascon merged 3 commits intomainfrom
feat/add-gh-response-validation

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
@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