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

feat: export AsyncAPISchema and v2 types #656

Merged
merged 3 commits into from
Oct 20, 2022

Conversation

smoya
Copy link
Member

@smoya smoya commented Oct 19, 2022

Description

This PR exports some types that are required by other packages. In particular, by this avro-schema-parser PR.

Related issue(s)
asyncapi/avro-schema-parser#166

@magicmatatjahu
Copy link
Member

@smoya Thanks for PR! I pushed some changes.

  • I know that you need AsyncAPiSchemaObject and ...Definition but we should export on the root only AsyncAPiSchemaObject type. Only Avro needs ...Definition so you will have to import it by specTypesV2.AsyncAPISchemaDefinition
  • I also exported v2 types.

@magicmatatjahu magicmatatjahu changed the title feat: export AsyncAPISchema and AsyncAPISchemaDefinition types feat: export AsyncAPISchema and v2 types Oct 20, 2022
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@smoya
Copy link
Member Author

smoya commented Oct 20, 2022

@smoya Thanks for PR! I pushed some changes.

  • I know that you need AsyncAPiSchemaObject and ...Definition but we should export on the root only AsyncAPiSchemaObject type. Only Avro needs ...Definition so you will have to import it by specTypesV2.AsyncAPISchemaDefinition

I would love to understand the reason! 🙏

@magicmatatjahu
Copy link
Member

@smoya We shouldn't export AsyncAPiSchemaObject and AsyncAPiSchemaDefinition as separate types in the root, because AsyncAPiSchemaObject is a exactly shape of AsyncAPISchema, AsyncAPiSchemaDefinition is only a helper type because AsyncAPISchema can be object and boolean.

@magicmatatjahu
Copy link
Member

/rtm

@asyncapi-bot asyncapi-bot merged commit 3479a32 into asyncapi:next-major Oct 20, 2022
@smoya smoya deleted the feat/exportTypes branch October 20, 2022 08:59
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 2.0.0-next-major.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants