Commit 310868a
authored
fix(avro)!: support named type references (#32)
* feat: add Obfuscan workflow for pull requests
Adds a new job named Obfuscan to the CI workflow to scan the pull request diff using the ByteBardOrg/obfuscan-action.
This job runs only when a pull request is opened, and it uses the head SHA of the pull request to check for potential issues in the code changes before the main build proceeds.
* fix(avro)!: support named type references
Adds Avro-specific named type handling for schemas that reference previously defined records, enums, or fixed types by name.
Introduces `AvroNamedType`, keeps AsyncAPI `$ref` handling unchanged, supports recursive schemas like `LongList`, and widens map `values` to accept any Avro schema instead of only primitive types.
Existing construction with `AvroPrimitiveType` is preserved through the existing implicit conversion to `AsyncApiAvroSchema`, and primitive schema values can be converted back with an explicit cast.
BREAKING CHANGE: `AvroMap.Values` now uses `AsyncApiAvroSchema` instead of `AvroPrimitiveType`.
* refactor: error and warning collection in document reader
Changed how validation errors and warnings are added to the diagnostic collection. Previously, all items from the validation result were iterated over. This change explicitly separates the handling of AsyncApiValidatorError into diagnostic.Errors and AsyncApiValidatorWarning into diagnostic.Warnings, ensuring correct categorization of validation feedback.
* docs: add schema wiki page
* remove docs file1 parent 5a27618 commit 310868a
9 files changed
Lines changed: 771 additions & 137 deletions
File tree
- src
- ByteBard.AsyncAPI.Readers
- Schemas
- ByteBard.AsyncAPI
- Models/Avro
- Services
- Validation/Rules
- test/ByteBard.AsyncAPI.Tests
- Models
- Validation
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
172 | 177 | | |
173 | 178 | | |
174 | 179 | | |
| |||
0 commit comments