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

use single json schema for key and value #158

Merged
merged 6 commits into from
Jan 2, 2025

Conversation

shortishly
Copy link
Contributor

An example JSON schema for the "person" topic:

{
  "title": "Person",
  "type": "object",
  "properties": {

    "key": {
      "type": "string",
      "pattern": "^[A-Z]{3}-\\d{3}$"
    },

    "value": {
      "type": "object",
      "properties": {
        "firstName": {
          "type": "string",
          "description": "The person's first name."
        },
        "lastName": {
          "type": "string",
          "description": "The person's last name."
        },
        "age": {
          "description": "Age in years which must be equal to or greater than zero.",
          "type": "integer",
          "minimum": 0
        }
      }
    }
  }
}

The schema must be an object, with properties for the message "key" and/or "value".

@shortishly shortishly linked an issue Jan 1, 2025 that may be closed by this pull request
@shortishly shortishly marked this pull request as ready for review January 1, 2025 15:18
@shortishly shortishly self-assigned this Jan 1, 2025
@shortishly shortishly added this to the 0.2.0 milestone Jan 2, 2025
@shortishly shortishly merged commit a64d3fa into main Jan 2, 2025
3 checks passed
@shortishly shortishly deleted the 157-use-single-json-schema-for-key-and-value branch January 2, 2025 12:46
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use single json schema for key and value
1 participant