schema-components - v3.7.0
    Preparing search index...

    Interface ApiResponseProps<Doc, Path, Method, Status, ContentType>

    Props accepted by ApiResponse.

    interface ApiResponseProps<
        Doc = unknown,
        Path extends PathKeysOf<Doc> = PathKeysOf<Doc>,
        Method extends MethodKeysOf<Doc, Path> = MethodKeysOf<Doc, Path>,
        Status extends
            StatusKeysOf<Doc, Path, Method> = StatusKeysOf<Doc, Path, Method>,
        ContentType extends
            ResponseContentTypesOf<Doc, Path, Method, Status> = ResponseContentTypesOf<
            Doc,
            Path,
            Method,
            Status,
        >,
    > {
        onDiagnostic?: DiagnosticSink;
        strict?: boolean;
        schema: Doc;
        path: Path;
        method: Method;
        status: Status;
        contentType?: ContentType;
        value?: unknown;
        meta?: SchemaMeta;
        fields?: Doc extends Record<string, unknown>
            ? InferResponseFields<Doc, Path, Method, Status, ContentType>
            : Record<string, FieldOverride>;
        widgets?: WidgetMap;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    onDiagnostic?: DiagnosticSink
    strict?: boolean
    schema: Doc
    path: Path
    method: Method
    status: Status
    contentType?: ContentType

    Media type whose schema should be rendered. Defaults to the union of declared content types so callers can omit it; supply explicitly to narrow fields inference via InferResponseFields.

    value?: unknown
    meta?: SchemaMeta
    fields?: Doc extends Record<string, unknown>
        ? InferResponseFields<Doc, Path, Method, Status, ContentType>
        : Record<string, FieldOverride>
    widgets?: WidgetMap

    Instance-scoped widgets.