Skip to content

Commit

Permalink
fix: add user-create.avsc file, update reference
Browse files Browse the repository at this point in the history
Changes:
- added external avro schema file: 'user-create.avsc'
- change the reference in the spec to point to the location of the avsc
  file
  • Loading branch information
AnimeshKumar923 committed Jul 5, 2024
1 parent e3d6a78 commit f814d82
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
15 changes: 15 additions & 0 deletions scripts/validation/user-create.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": "record",
"name": "UserCreate",
"namespace": "com.example",
"fields": [
{
"name": "id",
"type": "int"
},
{
"name": "name",
"type": "string"
}
]
}
8 changes: 4 additions & 4 deletions spec/asyncapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,7 @@ Example using Avro to define the payload:
"payload": {
"schemaFormat": "application/vnd.apache.avro+json;version=1.9.0",
"schema": {
"$ref": "path/to/user-create.avsc#/UserCreate"
"$ref": "user-create.avsc"
}
}
}
Expand All @@ -1402,7 +1402,7 @@ tags:
payload:
schemaFormat: 'application/vnd.apache.avro+yaml;version=1.9.0'
schema:
$ref: 'path/to/user-create.avsc/#UserCreate'
$ref: 'user-create.avsc'
```

#### <a name="messageTraitObject"></a>Message Trait Object
Expand Down Expand Up @@ -1664,7 +1664,7 @@ my.org.User
"AvroExample": {
"schemaFormat": "application/vnd.apache.avro+json;version=1.9.0",
"schema": {
"$ref": "path/to/user-create.avsc#/UserCreate"
"$ref": "user-create.avsc"
}
}
},
Expand Down Expand Up @@ -1789,7 +1789,7 @@ components:
AvroExample:
schemaFormat: application/vnd.apache.avro+json;version=1.9.0
schema:
$ref: 'path/to/user-create.avsc/#UserCreate'
$ref: 'user-create.avsc'
servers:
development:
host: "{stage}.in.mycompany.com:{port}"
Expand Down

0 comments on commit f814d82

Please sign in to comment.