Closed neongrau closed 5 days ago
Please include the minimal spec to demonstrate this. Closing for now. Will reopen after spec is included.
Does this help ?
---
paths:
"/api/v4/tenants/{tenant_id}/staffs/{id}":
put:
summary: Update Employees
tags:
- Contacts & Employees
operationId: tenants-staffs-update
description: "This endpoint..."
security:
- Bearer: []
parameters:
- name: tenant_id
in: path
required: true
description: Employees tenant_id
schema:
type: string
- name: id
in: path
required: true
description: Employees id
schema:
type: string
- name: locale
in: query
description: to control the language returned
schema:
"$ref": "#/components/schemas/locales"
responses:
'200':
description: Staff updated
content:
application/json:
schema:
type: object
required:
- data
description: Single endpoints will return an object as data
properties:
data:
type: object
required:
- id
- type
- attributes
properties:
id:
type: string
type:
type: string
enum:
- staff
attributes:
anyOf:
- "$ref": "#/components/schemas/StaffSerializer"
- "$ref": "#/components/schemas/StaffOverviewSerializer"
relationships:
"$ref": "#/components/schemas/relationships"
links:
description: URL resources for this record
anyOf:
- "$ref": "#/components/schemas/StaffSerializer.Links"
meta:
"$ref": "#/components/schemas/meta"
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
data[email]:
type: string
nullable: true
format: email
description: email (must be unique)
oneOf:
- type: string
nullable: true
description: to remove set to null or blank
- type: string
format: email
description: a valid email address
data[joined]:
type: string
description: date the employee joined the facility
oneOf:
- type: string
format: date
description: ISO 8601 date
- type: string
format: date_time
description: ISO 8601 datetime (time will be ignored)
instead of the actual field name they get submitted with the numbering as the anyOf/oneOf values are displayed
Even the curl command will directly show the value as
curl .... -F "1=2024-01-01"