Skip to content

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

Description

@dr0pi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions