dos: add docs on overriding allowed fields in routes (#12233)

This commit is contained in:
Shahed Nasser authored and GitHub committed 2025-04-18 11:38:36 +03:00
1 parent 28958b2e26
commit a3aa5d7a66
45 files changed
+17052 -16618

No files matched your search

@@ -34,7 +34,11 @@ post:
Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields.
prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs:
url: '#select-fields-and-relations'
requestBody:
@@ -25,7 +25,11 @@ get:
Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will
replace the entire default fields.
replace the entire default fields. This API route restricts the fields
that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false
schema:
type: string
@@ -34,7 +38,11 @@ get:
Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields.
prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs:
url: '#select-fields-and-relations'
security:
@@ -103,7 +111,11 @@ post:
Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields.
prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs:
url: '#select-fields-and-relations'
security:
@@ -26,7 +26,11 @@ get:
Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will
replace the entire default fields.
replace the entire default fields. This API route restricts the fields
that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false
schema:
type: string
@@ -35,7 +39,11 @@ get:
Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields.
prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs:
url: '#select-fields-and-relations'
- name: offset
@@ -182,7 +190,11 @@ post:
Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will
replace the entire default fields.
replace the entire default fields. This API route restricts the fields
that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false
schema:
type: string
@@ -191,7 +203,11 @@ post:
Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields.
prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs:
url: '#select-fields-and-relations'
security:
@@ -27,7 +27,11 @@ get:
Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will
replace the entire default fields.
replace the entire default fields. This API route restricts the fields
that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false
schema:
type: string
@@ -36,7 +40,11 @@ get:
Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields.
prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs:
url: '#select-fields-and-relations'
security:
@@ -104,7 +112,11 @@ post:
Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will
replace the entire default fields.
replace the entire default fields. This API route restricts the fields
that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false
schema:
type: string
@@ -113,7 +125,11 @@ post:
Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields.
prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs:
url: '#select-fields-and-relations'
security:
@@ -249,7 +265,11 @@ delete:
Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will
replace the entire default fields.
replace the entire default fields. This API route restricts the fields
that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false
schema:
type: string
@@ -258,7 +278,11 @@ delete:
Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields.
prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs:
url: '#select-fields-and-relations'
security: