asyncapi3-1.0.0.0: test/golden/spec-examples/51-multi-format-schema-object---avro-yaml.json
{"asyncapi":"3.1.0","info":{"title":"AsyncAPI","version":"1.x.x","description":"This is a very good base doc, probably.","termsOfService":"https://asyncapi.org/terms/","license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"},"tags":[{"name":"e-commerce"}],"externalDocs":{"description":"Find more info here","url":"https://www.asyncapi.org"}},"servers":{"production":{"host":"rabbitmq.in.mycompany.com:5672","protocol":"amqp","protocolVersion":"1.0","pathname":"/v1","description":"Production RabbitMQ broker (uses the `production` vhost).","title":"Production Server","summary":"Production environment server","security":[{"type":"http","scheme":"bearer"}],"tags":[{"name":"production","description":"Production environment"}],"externalDocs":{"description":"Additional documentation for the production server","url":"https://example.com/docs/production"},"bindings":{"amqp":{"exchange":"my-exchange","queue":"my-queue"}}},"rabbitmqInProd":{"host":"{prod}.in.mycompany.com","protocol":"amqp","description":"Production server"},"rabbitmqInStaging":{"host":"{stage}.in.mycompany.com","protocol":"amqp","description":"Staging server"},"staging":{"host":"rabbitmq.in.mycompany.com:5672","protocol":"amqp","protocolVersion":"1.0","pathname":"/v1","description":"Staging RabbitMQ broker (uses the `staging` vhost).","title":"Staging Server","summary":"Staging environment server","security":[{"type":"apiKey","description":"Provide your API key as the user and leave the password empty.","in":"user"}],"tags":[{"name":"staging","description":"Staging environment"}],"externalDocs":{"description":"Additional documentation for the staging server","url":"https://example.com/docs/staging"},"bindings":{"amqp":{"exchange":"my-exchange","queue":"my-queue"}}}},"channels":{"example":{"messages":{"myMessage":{"payload":{"schemaFormat":"application/vnd.apache.avro;version=1.9.0","schema":{"doc":"User information","fields":[{"name":"displayName","type":"string"},{"name":"age","type":"int"}],"name":"User","namespace":"com.company","type":"record"}}}}},"user":{"address":"users.{userId}","messages":{"userCompletedOrder":{"$ref":"#/components/messages/userCompletedOrder"},"userSignedUp":{"$ref":"#/components/messages/userSignedUp"}},"title":"Users channel","description":"This channel is used to exchange messages about user events.","servers":[{"$ref":"#/servers/production"}],"parameters":{"userId":{"$ref":"#/components/parameters/userId"}},"tags":[{"name":"user","description":"User-related messages"}],"externalDocs":{"description":"Find more info here","url":"https://example.com"},"bindings":{"amqp":{"is":"queue","queue":{"exclusive":true}}}},"userSignup":{"address":"users.signup","messages":{"userSignedUp":{"$ref":"#/components/messages/userSignedUp"}},"description":"Channel for user signups"},"userSignupReply":{"address":"users.signup.reply","messages":{"userSignedUpReply":{"payload":{"type":"object","properties":{"message":{"type":"string","description":"Additional information"},"status":{"type":"string","description":"Status of the signup process"}}},"summary":"User signup reply message"}},"description":"Channel for user signup replies"}},"operations":{"sendUserSignUp":{"action":"send","channel":{"$ref":"#/channels/user"},"title":"User sign up","summary":"Action to sign a user up.","description":"A longer description","security":[{"type":"oauth2","description":"The oauth security descriptions","flows":{"clientCredentials":{"tokenUrl":"https://example.com/api/oauth/dialog","availableScopes":{"subscribe:auth_revocations":"Scope required for authorization revocation topic"}}},"scopes":["subscribe:auth_revocations"]}],"tags":[{"name":"user"},{"name":"signup"},{"name":"register"}],"bindings":{"amqp":{"ack":false}},"traits":[],"messages":[{"$ref":"#/channels/user/messages/userSignedUp"}],"reply":{"address":{"location":"$message.header#/replyTo"},"channel":{"$ref":"#/channels/userSignupReply"},"messages":[{"$ref":"#/channels/userSignupReply/messages/userSignedUpReply"}]}}},"components":{"schemas":{"Address":{"type":"object","properties":{"city":{"type":"string"},"state":{"type":"string"},"street":{"type":"string"},"zip":{"type":"string"}}},"AvroExample":{"schemaFormat":"application/vnd.apache.avro+json;version=1.9.0","schema":{"fields":[{"name":"id","type":"int"},{"name":"name","type":"string"}],"name":"UserCreate","namespace":"com.example","type":"record"}},"Category":{"type":"object","properties":{"id":{"type":"integer","format":"int64"}}},"ComplexModel":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"ErrorModel":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}},"Pet":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"}}},"signup":{"type":"object","required":["timestamp","source"],"properties":{"source":{"type":"string","description":"The source of the signup"},"timestamp":{"type":"string","description":"The timestamp of the signup","format":"date-time"}}},"userCreate":{"type":"object","required":["id","name","email"],"properties":{"email":{"type":"string","description":"The email of the user","format":"email"},"id":{"type":"string","description":"The ID of the user"},"name":{"type":"string","description":"The name of the user"}}}},"servers":{"development":{"host":"{stage}.in.mycompany.com","protocol":"amqp","description":"RabbitMQ broker","variables":{"stage":{"$ref":"#/components/serverVariables/stage"}},"security":[{"$ref":"#/components/securitySchemes/oauth"}],"bindings":{"$ref":"#/components/serverBindings/devAmqp"}}},"channels":{"user":{"address":"users.{userId}","messages":{"userSignedUp":{"$ref":"#/components/messages/userSignUp"}},"title":"Users channel","description":"This channel is used to exchange messages about user events.","servers":[{"$ref":"#/components/servers/development"}],"parameters":{"userId":{"$ref":"#/components/parameters/userId"}},"tags":[{"$ref":"#/components/tags/user"}],"externalDocs":{"$ref":"#/components/externalDocs/infoDocs"},"bindings":{"$ref":"#/components/channelBindings/user"}}},"operations":{"sendUserSignUp":{"action":"send","channel":{"$ref":"#/channels/user"},"title":"User sign up","bindings":{"$ref":"#/components/operationBindings/sendUser"},"traits":[{"$ref":"#/components/operationTraits/binding"}],"reply":{"$ref":"#/components/replies/signupReply"}}},"messages":{"userCompletedOrder":{"payload":{"type":"object","properties":{"amount":{"type":"number","description":"The total amount of the order"},"orderId":{"type":"string","description":"The ID of the order"},"userId":{"type":"string","description":"The ID of the user"}}},"contentType":"application/json","summary":"User completed order event"},"userSignUp":{"payload":{"$ref":"#/components/schemas/Category"},"correlationId":{"$ref":"#/components/correlationIds/default"},"summary":"Action to sign a user up.","bindings":{"$ref":"#/components/messageBindings/user"},"examples":[],"traits":[{"$ref":"#/components/messageTraits/commonHeaders"}]},"userSignedUp":{"headers":{"type":"object","properties":{"applicationInstanceId":{"type":"string","description":"Unique identifier for a given instance of the publishing application"},"correlationId":{"type":"string","description":"Correlation ID set by application"}}},"payload":{"type":"object","properties":{"signup":{"$ref":"#/components/schemas/signup"},"user":{"$ref":"#/components/schemas/userCreate"}}},"correlationId":{"description":"Default Correlation ID","location":"$message.header#/correlationId"},"contentType":"application/json","name":"UserSignup","title":"User signup","summary":"Action to sign a user up.","description":"A longer description","tags":[{"name":"user"},{"name":"signup"},{"name":"register"}],"examples":[{"headers":{"applicationInstanceId":"myInstanceId","correlationId":"my-correlation-id"},"payload":{"signup":{"someSignupKey":"someSignupValue"},"user":{"someUserKey":"someUserValue"}},"name":"SimpleSignup","summary":"A simple UserSignup example message"}],"traits":[{"$ref":"#/components/messageTraits/commonHeaders"}]},"userSignedUpReply":{"payload":{"type":"object","properties":{"message":{"type":"string","description":"Additional information"},"status":{"type":"string","description":"Status of the signup process"}}},"contentType":"application/json","name":"UserSignupReply","title":"User signup reply","summary":"User signup reply message"}},"securitySchemes":{"JWTAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"X509Auth":{"type":"X509","description":"X509 security scheme"},"apiKeyAuth":{"type":"apiKey","description":"API key security scheme","in":"user"},"basicAuth":{"type":"http","description":"Basic security scheme","scheme":"basic"},"httpApiAuth":{"type":"httpApiKey","description":"api_key","name":"API Key Sample","in":"header"},"oauth":{"type":"oauth2","description":"The oauth security descriptions","flows":{"clientCredentials":{"tokenUrl":"https://example.com/api/oauth/dialog","availableScopes":{"subscribe:auth_revocations":"Scope required for authorization revocation topic"}}},"scopes":["subscribe:auth_revocations"]},"saslAuth":{"type":"scramSha256","description":"SASL security scheme"},"symmetricEncryptionAuth":{"type":"symmetricEncryption","description":"Symmetric encryption security scheme"},"userPasswordAuth":{"type":"userPassword","description":"User password security scheme"}},"serverVariables":{"stage":{"default":"demo","description":"This value is assigned by the service provider in this example of `mycompany.com`"}},"parameters":{"userId":{"description":"Id of the user."}},"correlationIds":{"default":{"description":"Default Correlation ID","location":"$message.header#/correlationId"}},"replies":{"signupReply":{"address":{"$ref":"#/components/replyAddresses/signupReply"},"channel":{"$ref":"#/channels/userSignupReply"}}},"replyAddresses":{"signupReply":{"location":"$message.header#/replyTo"}},"externalDocs":{"infoDocs":{"description":"Find more info here","url":"https://example.com/docs"}},"tags":{"user":{"name":"user","description":"User-related messages"}},"operationTraits":{"binding":{"bindings":{"amqp":{"ack":false}}},"kafka":{"bindings":{"kafka":{"groupId":false}}}},"messageTraits":{"commonHeaders":{"headers":{"type":"object","properties":{"my-app-header":{"type":"integer","maximum":100,"minimum":0}}}}},"serverBindings":{"devAmqp":{"amqp":{"exchange":"my-exchange","queue":"my-queue"}}},"channelBindings":{"user":{"amqp":{"is":"queue","queue":{"exclusive":true}}}},"operationBindings":{"sendUser":{"amqp":{"ack":false}}},"messageBindings":{"user":{"amqp":{"bindingVersion":"0.3.0","contentEncoding":"gzip","messageType":"user.signup"}}}}}