feat: Reject unacceptable content types

This commit is contained in:
Joachim Van Herwegen
2020-11-09 11:31:09 +01:00
parent c1aa25f314
commit 69ed2e069f
5 changed files with 103 additions and 32 deletions

View File

@@ -7,7 +7,12 @@ export interface RepresentationPreference {
*/
value: string;
/**
* How important this preference is in a value going from 0 to 1.
* How preferred this value is in a number going from 0 to 1.
* Follows the quality values rule from RFC 7231:
*
* "The weight is normalized to a real number in the range 0 through 1,
* where 0.001 is the least preferred and 1 is the most preferred; a
* value of 0 means "not acceptable"."
*/
weight: number;
}