Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Validate if event-schema is valid json-schema #10

Open
dr0pi opened this issue Jun 5, 2020 · 0 comments
Open

Validate if event-schema is valid json-schema #10

dr0pi opened this issue Jun 5, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@dr0pi
Copy link
Member

dr0pi commented Jun 5, 2020

Expected Behavior

clin creates a valid json-schema from the yaml specs. In case the json-schema is not correct, fail fast and notify the user before (trying) to create/update an event-type in Nakadi.

This also allows for better error messages that hint the user to the actual error in the json-schema.

Actual Behavior

If the EventTypeSchema.schema is no valid json-schema, clin still posts to Nakadi and receives a 422 error.

Steps to Reproduce the Problem

  1. define yaml schema for an event-type that requires another yaml (e.g. Location: "@@@./definitions/location.yaml")
  2. remove the sub-schema linking
  3. generate json with clin and post to Nakadi (clin apply -X -e production -t $(token) wrong.yaml )

Specifications

  • Version: 1.0.0
  • Platform: Mac OS 10.15.x
  • Subsystem: Python 3.7.7
@dstockhammer dstockhammer added the enhancement New feature or request label Jun 5, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants