-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
chore: extend Schema Object to allow defining custom formats #797
chore: extend Schema Object to allow defining custom formats #797
Conversation
Kudos, SonarCloud Quality Gate passed! |
This pull request has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation. There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
8805c88
to
624ad52
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just left a small comment.
This looks like it's ready to be reviewed, right @magicmatatjahu?
"payload": { | ||
"$ref": "path/to/user-create.avsc#/UserCreate" | ||
"customSchema": { | ||
"format": "application/vnd.apache.avro+json;version=1.9.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it not make sense to keep schemaFormat
🤔 ?
I'd not allow this. This requires changing JSON Schema. IMHO we should go in a direction where we get rid of the differences with JSON Schema instead of adding more "extra" keys. This also adds an incredible complexity for flexibility I doubt anyone would need. This is Avro inside a JSON Schema object but what about the opposite? Should we also alter Avro to accept JSON Schema inside? Aren't we mixing different things in the same place? I mean, JSON Schema is a constraint system and Avro is a data-serialization system. I know the same applies without this feature but at least we don't mix and match 🤔 |
More info why I'm closing -> #622 (comment) We can always reopen it, when we will have conclusion. |
title: "extend Schema Object to allow defining custom formats"
Related issue(s):
#622
This PR suggests how we could use custom schemas (in custom formats):
customSchema
has been added, which belongs to the AsyncAPI Schema Object vocabulary (described byCustom Schema Object
)schemaFormat
in theMessage Object
is deprecatedtitle
,description
,externalDocs
alongsidecustomSchema
keywordExamples
Model defined by Custom Schema
Model defined by Custom Schema with documentation fields
Model using nested Custom Schema Format
Message with custom format (show usage of
$ref
)