-
Notifications
You must be signed in to change notification settings - Fork 73
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: billing add subscription metadata to lines #1959
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,6 +78,22 @@ model UniqueResource { | |
key: Key; | ||
} | ||
|
||
/** | ||
* IDResource is a resouce with an ID. | ||
*/ | ||
// NOTE: this can be used to have a type, that we can later replace with the expanded type if needed without | ||
// breaking api compatibility | ||
@friendlyName("IDResource") | ||
model IDResource { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the value of doing IDResource? Is the resource type changing for the fields where it's used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This btw reminds me of GraphQL's global IDs where every resource's ID is globally unique. Usually it's a concatenation of the type and ID . There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just an API compatibility issue. This allows the response to be like this:
This way if we want to extend the API with extending the objects later, we can do that without needing to break the API. |
||
/** | ||
* A unique identifier for the resource. | ||
*/ | ||
@visibility("read") | ||
@example("01G65Z755AFWAKHE12NY0CQ9FH") | ||
@summary("ID") | ||
id: ULID; | ||
} | ||
|
||
/** | ||
* Represents common fields of resources. | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be singular? Looks like reference is for one.