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: add option to set templated flag #7

Merged
merged 2 commits into from
May 7, 2024

Conversation

yitsushi
Copy link
Contributor

@yitsushi yitsushi commented May 7, 2024

Based on the pending draft RFC1, a link can be marked as templated as defined in section 5.2:

5.2. templated
The "templated" property is OPTIONAL.

Its value is boolean and SHOULD be true when the Link Object's "href" property is a URI Template.

Its value SHOULD be considered false if it is undefined or any other value than true.

Footnotes

  1. https://datatracker.ietf.org/doc/html/draft-kelly-json-hal-11

Based on the pending draft RFC[^1], a link can be marked as
`templated` as defined in section 5.2:

> 5.2. templated
> The "templated" property is OPTIONAL.
>
> Its value is boolean and SHOULD be true when the Link Object's "href" property is a URI Template.
>
> Its value SHOULD be considered false if it is undefined or any other value than true.

[^1]: https://datatracker.ietf.org/doc/html/draft-kelly-json-hal-11
@survivorbat
Copy link
Collaborator

Hi @yitsushi, thank you for the contribution and for bringing attention to the RFC. The omitempty makes the addition backwards compatible, so I have no objections to merging it and releasing it as a minor release.

May I request you include a docstring above the Templated property to explain its purpose, with a link to the RFC section?

Thank you in advance :-)

@survivorbat survivorbat merged commit b09cf32 into ing-bank:master May 7, 2024
@yitsushi yitsushi deleted the add-templated branch May 7, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants