Skip to content

Commit

Permalink
Merge pull request #7 from yitsushi/add-templated
Browse files Browse the repository at this point in the history
feat: add option to set templated flag
  • Loading branch information
survivorbat authored May 7, 2024
2 parents 8d68db1 + 9dc90cc commit b09cf32
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ type LinkInfo struct {
Method string `json:"method"`
Href string `json:"href"`
Comment string `json:"comment"`
// Templated marks the link as a template, so the client can identify a link
// as a template and they don't try to call the endpoint as it is presented.
//
// This field is defined in the draft RFC in section 5.2:
// https://datatracker.ietf.org/doc/html/draft-kelly-json-hal#section-5.2
Templated bool `json:"templated,omitempty"`
}

// LinkOption is used to register links in a LinkRegistry. Urls may contain
Expand Down

0 comments on commit b09cf32

Please sign in to comment.