oas: [3/n] Improve admin OAS (#8875)

Improve the OAS of admin API routes [3/n]
This commit is contained in:
Shahed Nasser
2024-08-30 10:20:20 +03:00
committed by GitHub
parent 80fd20b21e
commit bab6ad4c55
15 changed files with 2037 additions and 37 deletions

View File

@@ -1,8 +1,14 @@
/**
* @oas [delete] /admin/returns/{id}/shipping-method/{action_id}
* operationId: DeleteReturnsIdShippingMethodAction_id
* summary: Remove Shipping Methods from Return
* description: Remove a list of shipping methods from a return. This doesn't delete the Shipping Method, only the association between the Shipping Method and the return.
* summary: Remove Shipping Method from Return
* x-sidebar-summary: Remove Shipping Method
* description: >
* Remove a shipping method of the return by the ID of the item's `SHIPPING_ADD` action.
*
*
* Every item has an `actions` property, whose value is an array of actions. You can check the action's
* name using its `action` property, and use the value of the `id` property.
* x-authenticated: true
* parameters:
* - name: id
@@ -13,7 +19,7 @@
* type: string
* - name: action_id
* in: path
* description: The return's action id.
* description: The ID of the shipping method's `SHIPPING_ADD` action.
* required: true
* schema:
* type: string

View File

@@ -1,8 +1,9 @@
/**
* @oas [delete] /admin/tax-rates/{id}/rules/{rule_id}
* operationId: DeleteTaxRatesIdRulesRule_id
* summary: Remove Rules from Tax Rate
* description: Remove a list of rules from a tax rate. This doesn't delete the Rule, only the association between the Rule and the tax rate.
* summary: Remove Rule of Tax Rate
* x-sidebar-summary: Remove Rule
* description: Remove a tax rate's rule.
* x-authenticated: true
* parameters:
* - name: id
@@ -13,7 +14,7 @@
* type: string
* - name: rule_id
* in: path
* description: The tax rate's rule id.
* description: The tax rate rule's ID.
* required: true
* schema:
* type: string
@@ -91,14 +92,15 @@
* object:
* type: string
* title: object
* description: The tax rate's object.
* description: The name of the deleted object.
* default: "tax_rate_rule"
* deleted:
* type: boolean
* title: deleted
* description: The tax rate's deleted.
* description: Whether the tax rate rule was deleted.
* parent:
* type: object
* description: The tax rate's parent.
* description: The parent tax rate.
* "400":
* $ref: "#/components/responses/400_error"
* "401":

View File

@@ -1,13 +1,13 @@
/**
* @oas [delete] /admin/uploads/{id}
* operationId: DeleteUploadsId
* summary: Delete a Upload
* description: Delete a upload.
* summary: Delete a File
* description: Delete a file. Uses the installed file module provider to delete the file.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The upload's ID.
* description: The file's ID.
* required: true
* schema:
* type: string
@@ -39,15 +39,16 @@
* id:
* type: string
* title: id
* description: The upload's ID.
* description: The file's ID.
* object:
* type: string
* title: object
* description: The upload's object.
* description: The name of the deleted object.
* default: file
* deleted:
* type: boolean
* title: deleted
* description: The upload's deleted.
* description: Whether the file was deleted.
* parent:
* type: object
* description: The upload's parent.

View File

@@ -1,13 +1,14 @@
/**
* @oas [get] /admin/api-keys/{id}
* operationId: GetApiKeysId
* summary: Get a Api Key
* description: Retrieve a api key by its ID. You can expand the api key's relations or select the fields that should be returned.
* summary: Get API Key
* description: Retrieve an API key by its ID. You can expand the API key's
* relations or select the fields that should be returned using the query parameters.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The api key's ID.
* description: The API key's ID.
* required: true
* schema:
* type: string

View File

@@ -47,6 +47,54 @@
* type: string
* title: order
* description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
* - name: q
* in: query
* description: Search term to filter the campaign's searchable properties.
* required: false
* schema:
* type: string
* title: q
* description: Search term to filter the campaign's searchable properties.
* - name: campaign_identifier
* in: query
* description: Filter the campaign by its identifier.
* required: false
* schema:
* type: string
* title: campaign_identifier
* description: Filter the campaign by its identifier.
* - name: budget
* in: query
* description: Filter the campaign by its budget.
* required: false
* schema:
* type: object
* description: Filter the campaign by its budget.
* properties:
* currency_code:
* type: string
* title: currency_code
* description: Filter the campaign by its budget's currency code.
* - name: $and
* in: query
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* required: false
* schema:
* type: array
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $and
* - name: $or
* in: query
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* required: false
* schema:
* type: array
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $or
* security:
* - api_token: []
* - cookie_auth: []
@@ -67,7 +115,7 @@
* schema:
* allOf:
* - type: object
* description: SUMMARY
* description: The paginated list of campaigns.
* required:
* - limit
* - offset
@@ -76,23 +124,23 @@
* limit:
* type: number
* title: limit
* description: The campaign's limit.
* description: The maximum number of items retrieved.
* offset:
* type: number
* title: offset
* description: The campaign's offset.
* description: The number of its skipped before the returned items.
* count:
* type: number
* title: count
* description: The campaign's count.
* description: The total number of items.
* - type: object
* description: SUMMARY
* description: The list of campaigns
* required:
* - campaigns
* properties:
* campaigns:
* type: array
* description: The campaign's campaigns.
* description: The list of campaigns.
* items:
* $ref: "#/components/schemas/CampaignResponse"
* "400":

View File

@@ -2,7 +2,8 @@
* @oas [get] /admin/campaigns/{id}
* operationId: GetCampaignsId
* summary: Get a Campaign
* description: Retrieve a campaign by its ID. You can expand the campaign's relations or select the fields that should be returned.
* description: Retrieve a campaign by its ID. You can expand the campaign's
* relations or select the fields that should be returned using the query parameters.
* x-authenticated: true
* parameters:
* - name: id

View File

@@ -2,7 +2,8 @@
* @oas [get] /admin/claims/{id}
* operationId: GetClaimsId
* summary: Get a Claim
* description: Retrieve a claim by its ID. You can expand the claim's relations or select the fields that should be returned.
* description: Retrieve a claim by its ID. You can expand the claim's relations or
* select the fields that should be returned using the query parameters.
* x-authenticated: true
* parameters:
* - name: id

View File

@@ -47,6 +47,769 @@
* type: string
* title: order
* description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
* - name: deleted_at
* in: query
* description: Filter by the collection's deletion date.
* required: false
* schema:
* type: object
* description: Filter by the collection's deletion date.
* properties:
* $and:
* type: array
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $and
* $or:
* type: array
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $or
* $eq:
* oneOf:
* - type: string
* title: $eq
* description: Filter by an exact match.
* - type: array
* description: Filter by multiple exact matches.
* items:
* type: string
* title: $eq
* description: An exact match.
* $ne:
* type: string
* title: $ne
* description: Filter by values not equal to this parameter.
* $in:
* type: array
* description: Filter by values in this array.
* items:
* type: string
* title: $in
* description: The value to match.
* $nin:
* type: array
* description: Filter by values not in this array.
* items:
* type: string
* title: $nin
* description: The value not to match.
* $not:
* oneOf:
* - type: string
* title: $not
* description: Filter by values not matching this parameter.
* - type: object
* description: Filter by values not matching the conditions in this parameter.
* properties:
* $and:
* type: array
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $and
* $or:
* type: array
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $or
* $eq:
* oneOf:
* - type: string
* title: $eq
* description: Filter by an exact match.
* - type: array
* description: Filter by multiple exact matches.
* items:
* type: string
* title: $eq
* description: The value to match.
* $ne:
* type: string
* title: $ne
* description: Filter by values not matching this parameter.
* $in:
* type: array
* description: Filter by values in this array.
* items:
* type: string
* title: $in
* description: The value to match.
* $nin:
* type: array
* description: Filter by values not in this array.
* items:
* type: string
* title: $nin
* description: The value to not match
* $not:
* oneOf:
* - type: string
* title: $not
* description: Filter by values not matching this parameter
* - type: object
* description: Filter by values not matching the conditions in this parameter.
* - type: array
* description: Filter by values not matching the values of this parameter.
* items:
* type: string
* title: $not
* description: The values to not match.
* $gt:
* type: string
* title: $gt
* description: Filter by values greater than this parameter. Useful for numbers and dates only.
* $gte:
* type: string
* title: $gte
* description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
* $lt:
* type: string
* title: $lt
* description: Filter by values less than this parameter. Useful for numbers and dates only.
* $lte:
* type: string
* title: $lte
* description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
* $like:
* type: string
* title: $like
* description: Apply a `like` filter. Useful for strings only.
* $re:
* type: string
* title: $re
* description: Apply a regex filter. Useful for strings only.
* $ilike:
* type: string
* title: $ilike
* description: Apply a case-insensitive `like` filter. Useful for strings only.
* $fulltext:
* type: string
* title: $fulltext
* description: Filter to apply on full-text properties.
* $overlap:
* type: array
* description: Filter arrays that have overlapping values with this parameter.
* items:
* type: string
* title: $overlap
* description: The value to match.
* $contains:
* type: array
* description: Filter arrays that contain some of the values of this parameter.
* items:
* type: string
* title: $contains
* description: The values to match.
* $contained:
* type: array
* description: Filter arrays that contain all values of this parameter.
* items:
* type: string
* title: $contained
* description: The values to match.
* $exists:
* type: boolean
* title: $exists
* description: Filter by whether a value for this parameter exists (not `null`).
* - type: array
* description: Filter by values not matching those in this parameter.
* items:
* type: string
* title: $not
* description: The values to not match.
* $gt:
* type: string
* title: $gt
* description: Filter by values greater than this parameter. Useful for numbers and dates only.
* $gte:
* type: string
* title: $gte
* description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
* $lt:
* type: string
* title: $lt
* description: Filter by values less than this parameter. Useful for numbers and dates only.
* $lte:
* type: string
* title: $lte
* description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
* $like:
* type: string
* title: $like
* description: Apply a `like` filter. Useful for strings only.
* $re:
* type: string
* title: $re
* description: Apply a regex filter. Useful for strings only.
* $ilike:
* type: string
* title: $ilike
* description: Apply a case-insensitive `like` filter. Useful for strings only.
* $fulltext:
* type: string
* title: $fulltext
* description: Filter to apply on full-text properties.
* $overlap:
* type: array
* description: Filter arrays that have overlapping values with this parameter.
* items:
* type: string
* title: $overlap
* description: The values to match.
* $contains:
* type: array
* description: Filter arrays that contain some of the values of this parameter.
* items:
* type: string
* title: $contains
* description: The values to match.
* $contained:
* type: array
* description: Filter arrays that contain all values of this parameter.
* items:
* type: string
* title: $contained
* description: The values to match.
* $exists:
* type: boolean
* title: $exists
* description: Filter by whether a value for this parameter exists (not `null`).
* - name: q
* in: query
* description: Search term to filter the collection's searchable properties by.
* required: false
* schema:
* type: string
* title: q
* description: Search term to filter the collection's searchable properties by.
* - name: id
* in: query
* required: false
* schema:
* oneOf:
* - type: string
* title: id
* description: Filter by a collection's ID.
* - type: array
* description: Filter by collection IDs.
* items:
* type: string
* title: id
* description: The collection's ID.
* - name: handle
* in: query
* required: false
* schema:
* oneOf:
* - type: string
* title: handle
* description: Filter by a collection's handle.
* - type: array
* description: Filter by collection handles.
* items:
* type: string
* title: handle
* description: The collection's handle.
* - name: title
* in: query
* required: false
* schema:
* oneOf:
* - type: string
* title: title
* description: Filter by a collection's title.
* - type: array
* description: Filter by collection titles.
* items:
* type: string
* title: title
* description: The collection's title.
* - name: created_at
* in: query
* description: Filter by the collection's creation date.
* required: false
* schema:
* type: object
* description: Filter by the collection's creation date.
* properties:
* $and:
* type: array
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $and
* $or:
* type: array
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $or
* $eq:
* oneOf:
* - type: string
* title: $eq
* description: Filter by an exact match.
* - type: array
* description: Filter by multiple exact matches.
* items:
* type: string
* title: $eq
* description: An exact match.
* $ne:
* type: string
* title: $ne
* description: Filter by values not equal to this parameter.
* $in:
* type: array
* description: Filter by values in this array.
* items:
* type: string
* title: $in
* description: The value to match.
* $nin:
* type: array
* description: Filter by values not in this array.
* items:
* type: string
* title: $nin
* description: The value not to match.
* $not:
* oneOf:
* - type: string
* title: $not
* description: Filter by values not matching this parameter.
* - type: object
* description: Filter by values not matching the conditions in this parameter.
* properties:
* $and:
* type: array
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $and
* $or:
* type: array
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $or
* $eq:
* oneOf:
* - type: string
* title: $eq
* description: Filter by an exact match.
* - type: array
* description: Filter by multiple exact matches.
* items:
* type: string
* title: $eq
* description: The value to match.
* $ne:
* type: string
* title: $ne
* description: Filter by values not matching this parameter.
* $in:
* type: array
* description: Filter by values in this array.
* items:
* type: string
* title: $in
* description: The value to match.
* $nin:
* type: array
* description: Filter by values not in this array.
* items:
* type: string
* title: $nin
* description: The value to not match
* $not:
* oneOf:
* - type: string
* title: $not
* description: Filter by values not matching this parameter
* - type: object
* description: Filter by values not matching the conditions in this parameter.
* - type: array
* description: Filter by values not matching the values of this parameter.
* items:
* type: string
* title: $not
* description: The values to not match.
* $gt:
* type: string
* title: $gt
* description: Filter by values greater than this parameter. Useful for numbers and dates only.
* $gte:
* type: string
* title: $gte
* description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
* $lt:
* type: string
* title: $lt
* description: Filter by values less than this parameter. Useful for numbers and dates only.
* $lte:
* type: string
* title: $lte
* description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
* $like:
* type: string
* title: $like
* description: Apply a `like` filter. Useful for strings only.
* $re:
* type: string
* title: $re
* description: Apply a regex filter. Useful for strings only.
* $ilike:
* type: string
* title: $ilike
* description: Apply a case-insensitive `like` filter. Useful for strings only.
* $fulltext:
* type: string
* title: $fulltext
* description: Filter to apply on full-text properties.
* $overlap:
* type: array
* description: Filter arrays that have overlapping values with this parameter.
* items:
* type: string
* title: $overlap
* description: The value to match.
* $contains:
* type: array
* description: Filter arrays that contain some of the values of this parameter.
* items:
* type: string
* title: $contains
* description: The values to match.
* $contained:
* type: array
* description: Filter arrays that contain all values of this parameter.
* items:
* type: string
* title: $contained
* description: The values to match.
* $exists:
* type: boolean
* title: $exists
* description: Filter by whether a value for this parameter exists (not `null`).
* - type: array
* description: Filter by values not matching those in this parameter.
* items:
* type: string
* title: $not
* description: The values to not match.
* $gt:
* type: string
* title: $gt
* description: Filter by values greater than this parameter. Useful for numbers and dates only.
* $gte:
* type: string
* title: $gte
* description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
* $lt:
* type: string
* title: $lt
* description: Filter by values less than this parameter. Useful for numbers and dates only.
* $lte:
* type: string
* title: $lte
* description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
* $like:
* type: string
* title: $like
* description: Apply a `like` filter. Useful for strings only.
* $re:
* type: string
* title: $re
* description: Apply a regex filter. Useful for strings only.
* $ilike:
* type: string
* title: $ilike
* description: Apply a case-insensitive `like` filter. Useful for strings only.
* $fulltext:
* type: string
* title: $fulltext
* description: Filter to apply on full-text properties.
* $overlap:
* type: array
* description: Filter arrays that have overlapping values with this parameter.
* items:
* type: string
* title: $overlap
* description: The values to match.
* $contains:
* type: array
* description: Filter arrays that contain some of the values of this parameter.
* items:
* type: string
* title: $contains
* description: The values to match.
* $contained:
* type: array
* description: Filter arrays that contain all values of this parameter.
* items:
* type: string
* title: $contained
* description: The values to match.
* $exists:
* type: boolean
* title: $exists
* description: Filter by whether a value for this parameter exists (not `null`).
* - name: updated_at
* in: query
* description: Filter by the collection's update date.
* required: false
* schema:
* type: object
* description: Filter by the collection's update date.
* properties:
* $and:
* type: array
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $and
* $or:
* type: array
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $or
* $eq:
* oneOf:
* - type: string
* title: $eq
* description: Filter by an exact match.
* - type: array
* description: Filter by multiple exact matches.
* items:
* type: string
* title: $eq
* description: An exact match.
* $ne:
* type: string
* title: $ne
* description: Filter by values not equal to this parameter.
* $in:
* type: array
* description: Filter by values in this array.
* items:
* type: string
* title: $in
* description: The value to match.
* $nin:
* type: array
* description: Filter by values not in this array.
* items:
* type: string
* title: $nin
* description: The value not to match.
* $not:
* oneOf:
* - type: string
* title: $not
* description: Filter by values not matching this parameter.
* - type: object
* description: Filter by values not matching the conditions in this parameter.
* properties:
* $and:
* type: array
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $and
* $or:
* type: array
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $or
* $eq:
* oneOf:
* - type: string
* title: $eq
* description: Filter by an exact match.
* - type: array
* description: Filter by multiple exact matches.
* items:
* type: string
* title: $eq
* description: The value to match.
* $ne:
* type: string
* title: $ne
* description: Filter by values not matching this parameter.
* $in:
* type: array
* description: Filter by values in this array.
* items:
* type: string
* title: $in
* description: The value to match.
* $nin:
* type: array
* description: Filter by values not in this array.
* items:
* type: string
* title: $nin
* description: The value to not match
* $not:
* oneOf:
* - type: string
* title: $not
* description: Filter by values not matching this parameter
* - type: object
* description: Filter by values not matching the conditions in this parameter.
* - type: array
* description: Filter by values not matching the values of this parameter.
* items:
* type: string
* title: $not
* description: The values to not match.
* $gt:
* type: string
* title: $gt
* description: Filter by values greater than this parameter. Useful for numbers and dates only.
* $gte:
* type: string
* title: $gte
* description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
* $lt:
* type: string
* title: $lt
* description: Filter by values less than this parameter. Useful for numbers and dates only.
* $lte:
* type: string
* title: $lte
* description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
* $like:
* type: string
* title: $like
* description: Apply a `like` filter. Useful for strings only.
* $re:
* type: string
* title: $re
* description: Apply a regex filter. Useful for strings only.
* $ilike:
* type: string
* title: $ilike
* description: Apply a case-insensitive `like` filter. Useful for strings only.
* $fulltext:
* type: string
* title: $fulltext
* description: Filter to apply on full-text properties.
* $overlap:
* type: array
* description: Filter arrays that have overlapping values with this parameter.
* items:
* type: string
* title: $overlap
* description: The value to match.
* $contains:
* type: array
* description: Filter arrays that contain some of the values of this parameter.
* items:
* type: string
* title: $contains
* description: The values to match.
* $contained:
* type: array
* description: Filter arrays that contain all values of this parameter.
* items:
* type: string
* title: $contained
* description: The values to match.
* $exists:
* type: boolean
* title: $exists
* description: Filter by whether a value for this parameter exists (not `null`).
* - type: array
* description: Filter by values not matching those in this parameter.
* items:
* type: string
* title: $not
* description: The values to not match.
* $gt:
* type: string
* title: $gt
* description: Filter by values greater than this parameter. Useful for numbers and dates only.
* $gte:
* type: string
* title: $gte
* description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
* $lt:
* type: string
* title: $lt
* description: Filter by values less than this parameter. Useful for numbers and dates only.
* $lte:
* type: string
* title: $lte
* description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
* $like:
* type: string
* title: $like
* description: Apply a `like` filter. Useful for strings only.
* $re:
* type: string
* title: $re
* description: Apply a regex filter. Useful for strings only.
* $ilike:
* type: string
* title: $ilike
* description: Apply a case-insensitive `like` filter. Useful for strings only.
* $fulltext:
* type: string
* title: $fulltext
* description: Filter to apply on full-text properties.
* $overlap:
* type: array
* description: Filter arrays that have overlapping values with this parameter.
* items:
* type: string
* title: $overlap
* description: The values to match.
* $contains:
* type: array
* description: Filter arrays that contain some of the values of this parameter.
* items:
* type: string
* title: $contains
* description: The values to match.
* $contained:
* type: array
* description: Filter arrays that contain all values of this parameter.
* items:
* type: string
* title: $contained
* description: The values to match.
* $exists:
* type: boolean
* title: $exists
* description: Filter by whether a value for this parameter exists (not `null`).
* - name: $and
* in: query
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* required: false
* schema:
* type: array
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $and
* - name: $or
* in: query
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* required: false
* schema:
* type: array
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $or
* security:
* - api_token: []
* - cookie_auth: []

View File

@@ -2,7 +2,8 @@
* @oas [get] /admin/collections/{id}
* operationId: GetCollectionsId
* summary: Get a Collection
* description: Retrieve a collection by its ID. You can expand the collection's relations or select the fields that should be returned.
* description: Retrieve a collection by its ID. You can expand the collection's
* relations or select the fields that should be returned using the query parameters.
* x-authenticated: true
* parameters:
* - name: id

View File

@@ -47,6 +47,48 @@
* type: string
* title: order
* description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
* - name: q
* in: query
* description: The search term to filter the currency's searchable properties by.
* required: false
* schema:
* type: string
* title: q
* description: The search term to filter the currency's searchable properties by.
* - name: code
* in: query
* required: false
* schema:
* oneOf:
* - type: string
* title: code
* description: Filter by a currency code.
* - type: array
* description: Filter by currency codes.
* items:
* type: string
* title: code
* description: A currency code.
* - name: $and
* in: query
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* required: false
* schema:
* type: array
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $and
* - name: $or
* in: query
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* required: false
* schema:
* type: array
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $or
* security:
* - api_token: []
* - cookie_auth: []

View File

@@ -2,7 +2,8 @@
* @oas [get] /admin/currencies/{code}
* operationId: GetCurrenciesCode
* summary: Get a Currency
* description: Retrieve a currency by its ID. You can expand the currency's relations or select the fields that should be returned.
* description: Retrieve a currency by its code. You can expand the currency's
* relations or select the fields that should be returned using the query parameters.
* x-authenticated: true
* parameters:
* - name: code

View File

@@ -1,8 +1,74 @@
/**
* @schema AdminCurrency
* type: object
* description: The supported currency's currency.
* description: The currency's currencies.
* x-schemaName: AdminCurrency
* required:
* - code
* - symbol
* - symbol_native
* - name
* - decimal_digits
* - rounding
* - raw_rounding
* - created_at
* - updated_at
* - deleted_at
* properties:
* code:
* type: string
* title: code
* description: The currency's code.
* symbol:
* type: string
* title: symbol
* description: The currency's symbol.
* symbol_native:
* type: string
* title: symbol_native
* description: The currency's symbol native.
* name:
* type: string
* title: name
* description: The currency's name.
* decimal_digits:
* type: number
* title: decimal_digits
* description: The currency's decimal digits.
* rounding:
* type: number
* title: rounding
* description: The currency's rounding.
* raw_rounding:
* type: object
* description: The currency's raw rounding.
* required:
* - value
* - precision
* properties:
* value:
* type: string
* title: value
* description: The raw rounding's value.
* precision:
* type: number
* title: precision
* description: The raw rounding's precision.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The currency's created at.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The currency's updated at.
* deleted_at:
* type: string
* format: date-time
* title: deleted_at
* description: The currency's deleted at.
*
*/

View File

@@ -0,0 +1,52 @@
/**
* @schema AdminCurrencyListParams
* type: object
* description: SUMMARY
* x-schemaName: AdminCurrencyListParams
* properties:
* q:
* type: string
* title: q
* description: The currency's q.
* code:
* oneOf:
* - type: string
* title: code
* description: The currency's code.
* - type: array
* description: The currency's code.
* items:
* type: string
* title: code
* description: The code's details.
* limit:
* type: number
* title: limit
* description: The currency's limit.
* offset:
* type: number
* title: offset
* description: The currency's offset.
* order:
* type: string
* title: order
* description: The currency's order.
* fields:
* type: string
* title: fields
* description: The currency's fields.
* $and:
* type: array
* description: The currency's $and.
* items:
* type: object
* title: $and
* $or:
* type: array
* description: The currency's $or.
* items:
* type: object
* title: $or
*
*/

View File

@@ -0,0 +1,13 @@
/**
* @schema AdminCurrencyParams
* type: object
* description: SUMMARY
* x-schemaName: AdminCurrencyParams
* properties:
* fields:
* type: string
* title: fields
* description: The currency's fields.
*
*/