Type Alias: OpenApiFormProps
OpenApiFormProps =
object
Defined in: form/OpenApiForm.tsx:51
Properties
defaultValues?
optionaldefaultValues?:JsonObject
Defined in: form/OpenApiForm.tsx:67
Values that override the record and the schema defaults.
fields?
optionalfields?: (string|OpenApiFormField)[]
Defined in: form/OpenApiForm.tsx:60
Fields to show, in order. Omit to show every writable field of the body.
onCancel?
optionalonCancel?: () =>void
Defined in: form/OpenApiForm.tsx:71
Shows a cancel button that calls this.
Returns
void
onSuccess?
optionalonSuccess?: (data) =>void
Defined in: form/OpenApiForm.tsx:69
Called with the response body after a successful submit.
Parameters
| Parameter | Type |
|---|---|
data | unknown |
Returns
void
operationId
operationId:
string
Defined in: form/OpenApiForm.tsx:53
operationId of the operation to submit (POST, PUT or PATCH).
params?
optionalparams?:OperationParams
Defined in: form/OpenApiForm.tsx:58
Path and query params for the request, as one flat object (e.g. the id of the record being edited).
record?
optionalrecord?:JsonObject
Defined in: form/OpenApiForm.tsx:65
The record being edited. Omit it on a PUT/PATCH and the form loads it from the GET operation on the same path.
resetOnSuccess?
optionalresetOnSuccess?:boolean
Defined in: form/OpenApiForm.tsx:75
Clears the form after a successful submit (useful for repeated creates).
submitLabel?
optionalsubmitLabel?:string
Defined in: form/OpenApiForm.tsx:73
Submit button label. Defaults to "Save".