Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lossless ApiDOM transformation #101

Closed
4 tasks done
char0n opened this issue Sep 11, 2020 · 0 comments
Closed
4 tasks done

Lossless ApiDOM transformation #101

char0n opened this issue Sep 11, 2020 · 0 comments
Assignees
Labels
ApiDOM enhancement New feature or request
Milestone

Comments

@char0n
Copy link
Member

char0n commented Sep 11, 2020

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
@char0n char0n added enhancement New feature or request ApiDOM labels Sep 11, 2020
@char0n char0n added this to the M7 milestone Sep 11, 2020
@char0n char0n self-assigned this Sep 11, 2020
char0n added a commit that referenced this issue Sep 17, 2020
char0n added a commit that referenced this issue Sep 17, 2020
@char0n char0n closed this as completed Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ApiDOM enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant