-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add feature "sort" #29
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,13 @@ module ietf-list-pagination { | |
"RFC XXXX: List Pagination for YANG-driven Protocols"; | ||
} | ||
|
||
// Features | ||
|
||
feature sort { | ||
description | ||
'This feature indicates that the parameters "locale", "sort-by", | ||
and "direction" are supported.'; | ||
} | ||
|
||
// Annotations | ||
|
||
|
@@ -112,6 +119,7 @@ module ietf-list-pagination { | |
} | ||
|
||
md:annotation locale { | ||
if-feature "sort"; | ||
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. Not specific to this line, my comment applies to other Should 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. In RFC 7950 complex if-feature statements are double quoted In RFC 8639 simple if-feature statements are double quoted Should the double quotes be removed? I don't have a strong opinion. |
||
type string; | ||
description | ||
"This annotation contains the locale used when sorting. | ||
|
@@ -148,6 +156,7 @@ module ietf-list-pagination { | |
} | ||
|
||
identity locale-unavailable { | ||
if-feature "sort"; | ||
base list-pagination-error; | ||
description | ||
"The 'locale' query parameter input is not a valid | ||
|
@@ -187,12 +196,14 @@ module ietf-list-pagination { | |
statement applied to it (see RFC XXXX)."; | ||
} | ||
leaf locale { | ||
if-feature "sort"; | ||
type string; | ||
description | ||
"The 'locale' parameter indicates the locale which the | ||
entries in the working result-set should be collated."; | ||
} | ||
leaf sort-by { | ||
if-feature "sort"; | ||
type union { | ||
type string { | ||
// An RFC 7950 'descendant-schema-nodeid'. | ||
|
@@ -219,6 +230,7 @@ module ietf-list-pagination { | |
the end (e.g., after all nodes having values)."; | ||
} | ||
leaf direction { | ||
if-feature "sort"; | ||
type enumeration { | ||
enum forwards { | ||
description | ||
|
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.
This line needs to be updated too.