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

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

View File

@@ -12,8 +12,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. NOTE: This route doesn't allow
expanding custom relations.
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
@@ -22,8 +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. NOTE: This route
doesn't allow expanding custom relations.
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
@@ -4227,8 +4233,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. NOTE: This route doesn't allow
expanding custom relations.
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
@@ -4237,8 +4246,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. NOTE: This route
doesn't allow expanding custom relations.
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:

View File

@@ -18,8 +18,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. NOTE: This route doesn't allow
expanding custom relations.
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
@@ -28,8 +31,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. NOTE: This route
doesn't allow expanding custom relations.
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:
@@ -84,8 +90,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. NOTE: This route doesn't allow
expanding custom relations.
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
@@ -94,8 +103,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. NOTE: This route
doesn't allow expanding custom relations.
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:

View File

@@ -18,8 +18,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. NOTE: This route doesn't allow
expanding custom relations.
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
@@ -28,8 +31,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. NOTE: This route
doesn't allow expanding custom relations.
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
@@ -255,8 +261,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. NOTE: This route doesn't allow
expanding custom relations.
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
@@ -265,8 +274,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. NOTE: This route
doesn't allow expanding custom relations.
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:

View File

@@ -24,8 +24,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. NOTE: This route doesn't allow
expanding custom relations.
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,8 +37,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. NOTE: This route
doesn't allow expanding custom relations.
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:
@@ -99,8 +105,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. NOTE: This route doesn't allow
expanding custom relations.
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
@@ -109,8 +118,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. NOTE: This route
doesn't allow expanding custom relations.
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:
@@ -264,8 +276,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. NOTE: This route doesn't allow
expanding custom relations.
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
@@ -274,8 +289,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. NOTE: This route
doesn't allow expanding custom relations.
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:

View File

@@ -16,13 +16,18 @@ post:
- name: fields
in: query
description: >-
"Comma-separated fields that should be included in the returned data.
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. NOTE: This
route doesn't allow expanding custom relations."
without 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.
required: false
schema:
type: string
@@ -31,8 +36,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. NOTE: This route
doesn't allow expanding custom relations.
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:

View File

@@ -13,8 +13,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. NOTE: This route doesn't allow
expanding custom relations.
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
@@ -23,8 +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. NOTE: This route
doesn't allow expanding custom relations.
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
@@ -683,8 +689,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. NOTE: This route doesn't allow
expanding custom relations.
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
@@ -693,8 +702,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. NOTE: This route
doesn't allow expanding custom relations.
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:

View File

@@ -18,8 +18,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. NOTE: This route doesn't allow
expanding custom relations.
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
@@ -28,8 +31,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. NOTE: This route
doesn't allow expanding custom relations.
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: include_ancestors_tree
@@ -124,8 +130,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. NOTE: This route doesn't allow
expanding custom relations.
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
@@ -134,8 +143,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. NOTE: This route
doesn't allow expanding custom relations.
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:

View File

@@ -17,8 +17,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. NOTE: This route doesn't allow
expanding custom relations.
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
@@ -27,8 +30,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. NOTE: This route
doesn't allow expanding custom relations.
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: