Skip to main content

Type Alias: OpenApiFormProps

OpenApiFormProps = object

Defined in: form/OpenApiForm.tsx:51

Properties​

defaultValues?​

optional defaultValues?: JsonObject

Defined in: form/OpenApiForm.tsx:67

Values that override the record and the schema defaults.


fields?​

optional fields?: (string | OpenApiFormField)[]

Defined in: form/OpenApiForm.tsx:60

Fields to show, in order. Omit to show every writable field of the body.


onCancel?​

optional onCancel?: () => void

Defined in: form/OpenApiForm.tsx:71

Shows a cancel button that calls this.

Returns​

void


onSuccess?​

optional onSuccess?: (data) => void

Defined in: form/OpenApiForm.tsx:69

Called with the response body after a successful submit.

Parameters​

ParameterType
dataunknown

Returns​

void


operationId​

operationId: string

Defined in: form/OpenApiForm.tsx:53

operationId of the operation to submit (POST, PUT or PATCH).


params?​

optional params?: 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?​

optional record?: 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?​

optional resetOnSuccess?: boolean

Defined in: form/OpenApiForm.tsx:75

Clears the form after a successful submit (useful for repeated creates).


submitLabel?​

optional submitLabel?: string

Defined in: form/OpenApiForm.tsx:73

Submit button label. Defaults to "Save".