feat(entoas): add field descriptions and fix examples #577
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR does a few things:
types
map, because this was using the same fields, and changing the contents was impacting all fields of the same type. Don't see any noticeable performance difference -- not sure if this was intentional before or not.ptr[T any](v) *v
to help with code-duplication and should help with all of the pointer-to-base-types issues.Example()
annotation now works as expected. Previously, adding that annotation to any field, edge, or schema, didn't seem to have any affect.POST
bodies..Field()
) that are readonly, the field is skipped for creates/updates..Field()
) that isn't skipped, the edge object is skipped from the request body. If this isn't the case, two properties are required, which are in fact the same.friend_id
with an edgefriend
which is associated via.Field("friend_id")
, results in POST requests both havingfriend
andfriend_id
being required, but they both set the same thing./owners/<id>/pets
) now have tags for both types, if they differ (e.g.Owner
andPet
, rather than justOwner
).