Skip to content

AsyncAPI V3 - Work Items #207

Closed
Closed
@VisualBean

Description

@VisualBean

All work should be done against the vnext branch.

Preliminary info

The idea is that all of the models are updated to represent V3, but that it should still be fully serializable as V2.
In addition to this, V2 specifications should be deserialized to V3

https://www.asyncapi.com/docs/reference/specification/v3.0.0
https://github.com/asyncapi/spec-json-schemas/tree/master/definitions/3.0.0

Writing

  • Add AsyncApi3_0 to AsyncApiVersion
  • Go through each model one by one, and update the properties to match V3.
    • Update each SerializeV2 method, to output V2 from the V3 models - Some of these will require some bigger context, as some things have moved around quite a bit. Its important that V3 can be serialized as V2.
  • Update IAsyncApiSerializable to include a void SerializeV3(IAsyncApiWriter writer);
  • Update Serialize<T>(this T element, IAsyncApiWriter writer, AsyncApiVersion specificationVersion) in AsyncApiSerializableExtensions to include the new version in the switch case
  • refactor needed tests, and write new ones that ensure we can write both V2 and V3.

Reading

  • Update each deserializer in the V2 folder, to read into the V3 model. (Remember we are reading V2 into V3, so no need to change the left side of all of the field maps, only the right side).
  • Create a new folder for V3.
  • Copy each deserializer from V2 to V3 and amend the left side as needed (renaming them and ensuring proper deserialization from V3 to the V3 model.)
  • Create an AsyncApiV3VersionService copying and amended from the V2 one.
  • Update the Parse and ParseFragment methods in ParsingContext to include the new version service.
  • refactor needed tests, and write new ones that ensure we can read both V2 and V3.

Other

  • write new tests for new validation rules
  • update documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions