fix: Code for category
This commit is contained in:
@@ -160,10 +160,18 @@ paths:
|
||||
- name: category_id
|
||||
in: query
|
||||
required: false
|
||||
description: Filter to a category.
|
||||
description: Filter to a category by id.
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
- name: category_code
|
||||
in: query
|
||||
required: false
|
||||
description: >-
|
||||
Filter to a category by its code (slug). An unknown code yields an
|
||||
empty page.
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: A page of dataset summaries
|
||||
@@ -187,7 +195,7 @@ paths:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
type: object
|
||||
required: [file, file_type, category_id, code]
|
||||
required: [file, file_type, category_id]
|
||||
properties:
|
||||
file:
|
||||
type: string
|
||||
@@ -198,9 +206,6 @@ paths:
|
||||
category_id:
|
||||
type: string
|
||||
format: uuid
|
||||
code:
|
||||
type: string
|
||||
description: Business code.
|
||||
name:
|
||||
type: string
|
||||
description: Display name; defaults to the filename if omitted.
|
||||
@@ -441,7 +446,7 @@ components:
|
||||
|
||||
Category:
|
||||
type: object
|
||||
required: [id, name, description, created_at, updated_at]
|
||||
required: [id, code, name, description, created_at, updated_at]
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
@@ -449,6 +454,9 @@ components:
|
||||
parent_id:
|
||||
type: [string, "null"]
|
||||
format: uuid
|
||||
code:
|
||||
type: string
|
||||
description: Slug (lowercase latin letters, digits, and dashes).
|
||||
name:
|
||||
type: string
|
||||
description:
|
||||
@@ -462,11 +470,16 @@ components:
|
||||
|
||||
CategoryInput:
|
||||
type: object
|
||||
required: [name]
|
||||
required: [code, name]
|
||||
properties:
|
||||
parent_id:
|
||||
type: [string, "null"]
|
||||
format: uuid
|
||||
code:
|
||||
type: string
|
||||
maxLength: 255
|
||||
pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
description: Slug (lowercase latin letters, digits, and dashes).
|
||||
name:
|
||||
type: string
|
||||
maxLength: 255
|
||||
@@ -505,7 +518,7 @@ components:
|
||||
|
||||
DatasetSummary:
|
||||
type: object
|
||||
required: [id, category_id, code, name, file_type, size_bytes, status, created_at, updated_at]
|
||||
required: [id, category_id, name, file_type, size_bytes, status, created_at, updated_at]
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
@@ -513,8 +526,6 @@ components:
|
||||
category_id:
|
||||
type: string
|
||||
format: uuid
|
||||
code:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
description:
|
||||
@@ -538,7 +549,7 @@ components:
|
||||
Dataset:
|
||||
type: object
|
||||
required:
|
||||
[id, category_id, code, name, filename, storage_key, file_type,
|
||||
[id, category_id, name, filename, storage_key, file_type,
|
||||
size_bytes, content_type, automated, status, created_at, updated_at]
|
||||
properties:
|
||||
id:
|
||||
@@ -547,8 +558,6 @@ components:
|
||||
category_id:
|
||||
type: string
|
||||
format: uuid
|
||||
code:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
description:
|
||||
|
||||
Reference in New Issue
Block a user