Optimization - reusable components for orderby/expand/select query parameters
Since #197 was implemented through #499, we have a big opportunity to make descriptions much smaller.
Effectively all operations now have the same definition for those query parameters when they support it
- name: $orderby
in: query
description: Order items by property values
style: form
explode: false
schema:
uniqueItems: true
type: array
items:
type: string
- name: $select
in: query
description: Select properties to be returned
style: form
explode: false
schema:
uniqueItems: true
type: array
items:
type: string
- name: $expand
in: query
description: Expand related entities
style: form
explode: false
schema:
uniqueItems: true
type: array
items:
type: string
When the setting it on, we should do the same thing we do for count/top/skip/filter... and have instead
- $ref: '#/components/parameters/expand'
- $ref: '#/components/parameters/select'
- $ref: '#/components/parameters/orderby'
Which would save a ton of repetition throughout the final description.
I would request that we do not do this. This will cause us to lose the valuable information of which properties can be sorted, expanded and filtered.
@darrelmiller the component aspect would only happen when the UseStringArrayForQueryOptionsSchema conversion setting added in #499 is set to true, where the enum values are already gone, so this change would not "loose any more information". It would not happen when the setting is false. In which case we maintain the enum values.
Fine. We can defer the fight to choosing what value we should use for UseStringArrayForQueryOptionsSchema :-)