Skip to content

Lossless ApiDOM transformation #101

@char0n

Description

@char0n

Currently our transformation of JSON string to ApiDOM is not lossless. We do multiple assumptions about expected data types according to OpenAPI or AsyncAPI specifications and if assumptions turn out to be false, we set the resulting ApiDOM value to null. This needs to be changed, and ApiDOM needs to contains the same exact structure as the original JSON (important for validation). For data fragments we can identify, we use our namespace elements, otherwise the data became generic ApiDOM elements.

Warning: another thing that needs to be handled is fields that are not within fixed fields or are not patterned fields. Those too needs to be in ApiDOM. This change might evolve into separate issue as well.

  • Unknown types for OpenApi 3.1 spec
  • Unknown types for AsyncApi 2.0.0 spec
  • Unknown props for OpenApi 3.1 spec
  • Unknown props for AsyncApi 2.0.0 spec

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions