-
-
Notifications
You must be signed in to change notification settings - Fork 60
feat(multi format schema): support new media types #569
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
base: master
Are you sure you want to change the base?
feat(multi format schema): support new media types #569
Conversation
- application/raml+yaml;version=1.0 - application/vnd.google.protobuf;version=2 - application/vnd.google.protobuf;version=3 - application/xml
|
"application/vnd.google.protobuf;version=2", | ||
"application/vnd.google.protobuf;version=3", | ||
|
||
"application/xml" |
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.
do we need it here? in the end, it works without it listed here right? in the spec xml is not listed in the list of recommeneded schemas - and also, it is anyway just recommended
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.
Yep, otherwise here will be error
asyncapi: 3.0.0
info:
title: Account Service
version: 1.0.0
description: This service is in charge of processing user signups
channels:
userSignedUp:
address: user/signedup
messages:
UserSignedUp:
$ref: '#/components/messages/userSignedUp'
operations:
sendUserSignedUp:
action: send
channel:
$ref: '#/channels/userSignedUp'
messages:
- $ref: '#/channels/userSignedUp/messages/UserSignedUp'
components:
messages:
userSignedUp:
payload:
schemaFormat: application/xml
schema: |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="User">
<xs:complexType>
<xs:sequence>
<xs:element name="displayName" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the user</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="email" type="xs:string">
<xs:annotation>
<xs:documentation>Email of the user</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
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.
it is anyway just recommended
Yep, it's recommendation. But folks from Specmatic already have scenarios where they are using .xsd
as payload schema
Without proper registration UI component will not work because of error in our parser
Error thrown during AsyncAPI document parsing. Name: Error, message: Unknown schema format
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.
I have already checked this changes
Closes asyncapi/jasyncapi#214
Let's left them like ref, string or object. Generally idk which schema will represent them correctly