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

Write a document explaining the "inheritance" of Ion Schema #116

Open
popematt opened this issue May 5, 2023 · 0 comments
Open

Write a document explaining the "inheritance" of Ion Schema #116

popematt opened this issue May 5, 2023 · 0 comments
Labels
doc Documentation

Comments

@popematt
Copy link
Contributor

popematt commented May 5, 2023

Many Ion Schema users are used to Java, JavaScript, and Python where a subclass/inheritor extends (or adds to) a base class. Ion Schema is the opposite—an "inheritor" is always narrower than (or equal to) it's base type. It doesn't always look this way to new users—the fields constraint in particular looks like it should be additive to people who are primarily familiar with Java.

This document should include recommendations for modeling scenarios such as:

  • Enums
  • Sealed variants of a type (i.e. sealed classes in Kotlin, enums in Rust)
  • Abstract base classes
  • Interfaces
@popematt popematt added the doc Documentation label Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Documentation
Projects
None yet
Development

No branches or pull requests

1 participant