feat: complete SaaS commercial delivery workflows

This commit is contained in:
2026-08-01 15:26:21 +08:00
parent 46abf4d62f
commit d58bcd97e9
56 changed files with 27505 additions and 181 deletions

View File

@@ -29,6 +29,7 @@ export function normalizeOperationInput(operation: PlatformOperation, values: Op
export function OperationForm({ operation }: { operation: PlatformOperation }) {
const pathParameters = operation.parameters.filter((item) => item.in === 'path');
const queryParameters = operation.parameters.filter((item) => item.in === 'query');
const headerParameters = operation.parameters.filter((item) => item.in === 'header');
const bodySchema = resolveSchema(operation.requestSchema);
return (
<>
@@ -53,6 +54,17 @@ export function OperationForm({ operation }: { operation: PlatformOperation }) {
}}
/>
)}
{headerParameters.map((parameter) => (
<Form.Item
key={`header-${parameter.name}`}
name={['headers', parameter.name]}
label={parameter.description || parameter.name}
rules={[{ required: parameter.required, message: `请填写${parameter.description || parameter.name}` }]}
initialValue={parameter.name.toLowerCase() === 'idempotency-key' ? crypto.randomUUID() : undefined}
>
<Input />
</Form.Item>
))}
{operation.requestSchema && schemaType(bodySchema) === 'object' && (
<SchemaFields schema={bodySchema} prefix="body" required={bodySchema.required} />
)}