diff --git a/src/openapi.yaml b/src/openapi.yaml index 6f6bc60..a7b2d4f 100644 --- a/src/openapi.yaml +++ b/src/openapi.yaml @@ -461,6 +461,145 @@ paths: responses: '204': description: No response body + /api/v1/products/: + get: + operationId: products_list + tags: + - products + security: + - cookieAuth: [ ] + - basicAuth: [ ] + - { } + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Product' + description: '' + post: + operationId: products_create + tags: + - products + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Product' + required: true + security: + - cookieAuth: [ ] + - basicAuth: [ ] + - { } + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Product' + description: '' + /api/v1/products/{id}/: + get: + operationId: products_retrieve + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this Product. + required: true + tags: + - products + security: + - cookieAuth: [ ] + - basicAuth: [ ] + - { } + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Product' + description: '' + put: + operationId: products_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this Product. + required: true + tags: + - products + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductUpdate' + required: true + security: + - cookieAuth: [ ] + - basicAuth: [ ] + - { } + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProductUpdate' + description: '' + patch: + operationId: products_partial_update + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this Product. + required: true + tags: + - products + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedProductUpdate' + security: + - cookieAuth: [ ] + - basicAuth: [ ] + - { } + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProductUpdate' + description: '' + delete: + operationId: products_destroy + parameters: + - in: path + name: id + schema: + type: string + format: uuid + description: A UUID string identifying this Product. + required: true + tags: + - products + security: + - cookieAuth: [ ] + - basicAuth: [ ] + - { } + responses: + '204': + description: No response body /api/v1/producttypes/: get: operationId: producttypes_list @@ -1616,7 +1755,6 @@ components: parent_category: type: string format: uuid - writeOnly: true nullable: true product_types: type: array @@ -1699,6 +1837,41 @@ components: - negative_text - positive_text - question + Data: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + field: + allOf: + - $ref: '#/components/schemas/Field' + readOnly: true + field_id: + type: string + format: uuid + writeOnly: true + value: + type: string + description: The value of the field + required: + - field + - field_id + - id + - value + DataUpdate: + type: object + properties: + id: + type: string + format: uuid + value: + type: string + description: The value of the field + required: + - id + - value Field: type: object properties: @@ -1727,7 +1900,6 @@ components: * `date` - Date * `datetime` - Datetime * `email` - Email - * `file` - File * `iban` - Iban * `licenseplate` - License Plate * `map` - Map @@ -1784,7 +1956,6 @@ components: parent_category: type: string format: uuid - writeOnly: true nullable: true product_types: type: array @@ -1881,7 +2052,6 @@ components: * `date` - Date * `datetime` - Datetime * `email` - Email - * `file` - File * `iban` - Iban * `licenseplate` - License Plate * `map` - Map @@ -1993,7 +2163,6 @@ components: type: string format: uuid writeOnly: true - default: [ ] questions: type: array items: @@ -2059,6 +2228,51 @@ components: type: string maxLength: 100 description: List of keywords for search + PatchedProductUpdate: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + data: + type: array + items: + $ref: '#/components/schemas/DataUpdate' + published: + type: boolean + description: Whether the object is accessible through the API. + created_on: + type: string + format: date-time + readOnly: true + description: The datetime at which the object was created. + updated_on: + type: string + format: date-time + readOnly: true + description: The datetime at which the object was last changed. + start_date: + type: string + format: date + description: The start date for this product + end_date: + type: string + format: date + description: The end date for this product + bsn: + type: string + nullable: true + description: The BSN of the product owner. BSN of 8 characters needs a leading + 0. + kvk: + type: string + nullable: true + title: KVK number + description: The KVK number of the product owner + pattern: ^[0-9]*$ + maxLength: 8 + minLength: 8 PatchedQuestion: type: object properties: @@ -2145,6 +2359,68 @@ components: required: - amount - description + Product: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + product_type: + allOf: + - $ref: '#/components/schemas/SimpleProductType' + readOnly: true + product_type_id: + type: string + format: uuid + writeOnly: true + data: + type: array + items: + $ref: '#/components/schemas/Data' + published: + type: boolean + description: Whether the object is accessible through the API. + created_on: + type: string + format: date-time + readOnly: true + description: The datetime at which the object was created. + updated_on: + type: string + format: date-time + readOnly: true + description: The datetime at which the object was last changed. + start_date: + type: string + format: date + description: The start date for this product + end_date: + type: string + format: date + description: The end date for this product + bsn: + type: string + nullable: true + description: The BSN of the product owner. BSN of 8 characters needs a leading + 0. + kvk: + type: string + nullable: true + title: KVK number + description: The KVK number of the product owner + pattern: ^[0-9]*$ + maxLength: 8 + minLength: 8 + required: + - created_on + - data + - end_date + - id + - product_type + - product_type_id + - start_date + - updated_on ProductType: type: object properties: @@ -2201,7 +2477,6 @@ components: type: string format: uuid writeOnly: true - default: [ ] questions: type: array items: @@ -2269,6 +2544,7 @@ components: description: List of keywords for search required: - categories + - category_ids - conditions - content - created_on @@ -2282,6 +2558,58 @@ components: - uniform_product_name - uniform_product_name_id - updated_on + ProductUpdate: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + data: + type: array + items: + $ref: '#/components/schemas/DataUpdate' + published: + type: boolean + description: Whether the object is accessible through the API. + created_on: + type: string + format: date-time + readOnly: true + description: The datetime at which the object was created. + updated_on: + type: string + format: date-time + readOnly: true + description: The datetime at which the object was last changed. + start_date: + type: string + format: date + description: The start date for this product + end_date: + type: string + format: date + description: The end date for this product + bsn: + type: string + nullable: true + description: The BSN of the product owner. BSN of 8 characters needs a leading + 0. + kvk: + type: string + nullable: true + title: KVK number + description: The KVK number of the product owner + pattern: ^[0-9]*$ + maxLength: 8 + minLength: 8 + required: + - created_on + - data + - end_date + - id + - start_date + - updated_on Question: type: object properties: @@ -2301,6 +2629,10 @@ components: SimpleCategory: type: object properties: + id: + type: string + format: uuid + readOnly: true published: type: boolean description: Whether the object is accessible through the API. @@ -2333,6 +2665,7 @@ components: description: Image of the category required: - created_on + - id - name - updated_on SimpleProductType: @@ -2448,7 +2781,6 @@ components: - date - datetime - email - - file - iban - licenseplate - map @@ -2471,7 +2803,6 @@ components: * `date` - Date * `datetime` - Datetime * `email` - Email - * `file` - File * `iban` - Iban * `licenseplate` - License Plate * `map` - Map