From 364ede9120d84bf67cb52644fe37846fcb4dc8bd Mon Sep 17 00:00:00 2001 From: loup Date: Fri, 15 Aug 2025 00:25:06 +0200 Subject: [PATCH 1/2] feat(openapi): add TypeDef support to RPC OpenAPI generator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add TypeDef (custom type) generation to RPC OpenAPI spec - Generate OpenAPI schemas for all TypeDefs defined in zmodel - Map Json fields with @json decorator to reference TypeDef schemas - Support complex TypeDef structures including: - Nested TypeDefs (TypeDefs referencing other TypeDefs) - Arrays of TypeDefs - Enums in TypeDefs - Optional fields - Handle enums that are only used in TypeDefs (not in models) - Add comprehensive tests for TypeDef support - Update baseline files with new TypeDef fields 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- packages/plugins/openapi/src/rpc-generator.ts | 91 +- .../rpc-type-coverage-3.0.0.baseline.yaml | 5829 ++++++++-------- .../rpc-type-coverage-3.1.0.baseline.yaml | 5951 +++++++++-------- .../plugins/openapi/tests/openapi-rpc.test.ts | 94 + 4 files changed, 6401 insertions(+), 5564 deletions(-) diff --git a/packages/plugins/openapi/src/rpc-generator.ts b/packages/plugins/openapi/src/rpc-generator.ts index 5b47b810f..eee17c5ae 100644 --- a/packages/plugins/openapi/src/rpc-generator.ts +++ b/packages/plugins/openapi/src/rpc-generator.ts @@ -1,7 +1,7 @@ // Inspired by: https://github.com/omar-dulaimi/prisma-trpc-generator import { PluginError, PluginOptions, analyzePolicies, requireOption, resolvePath } from '@zenstackhq/sdk'; -import { DataModel, Model, isDataModel } from '@zenstackhq/sdk/ast'; +import { DataModel, Enum, Model, TypeDef, TypeDefField, TypeDefFieldType, isDataModel, isEnum, isTypeDef } from '@zenstackhq/sdk/ast'; import { AggregateOperationSupport, addMissingInputObjectTypesForAggregate, @@ -642,12 +642,27 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { for (const _enum of [...(this.dmmf.schema.enumTypes.model ?? []), ...this.dmmf.schema.enumTypes.prisma]) { schemas[upperCaseFirst(_enum.name)] = this.generateEnumComponent(_enum); } + + // Also add enums from AST that might not be in DMMF (e.g., only used in TypeDefs) + for (const enumDecl of this.model.declarations.filter(isEnum)) { + if (!schemas[upperCaseFirst(enumDecl.name)]) { + schemas[upperCaseFirst(enumDecl.name)] = { + type: 'string', + enum: enumDecl.fields.map(f => f.name) + }; + } + } // data models for (const model of this.dmmf.datamodel.models) { schemas[upperCaseFirst(model.name)] = this.generateEntityComponent(model); } + // type defs + for (const typeDef of this.model.declarations.filter(isTypeDef)) { + schemas[upperCaseFirst(typeDef.name)] = this.generateTypeDefComponent(typeDef); + } + for (const input of this.inputObjectTypes) { schemas[upperCaseFirst(input.name)] = this.generateInputComponent(input); } @@ -730,7 +745,7 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { const required: string[] = []; for (const field of model.fields) { - properties[field.name] = this.generateField(field); + properties[field.name] = this.generateField(field, model.name); if (field.isRequired && !(field.relationName && field.isList)) { required.push(field.name); } @@ -743,7 +758,22 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { return result; } - private generateField(def: { kind: DMMF.FieldKind; type: string; isList: boolean; isRequired: boolean }) { + private generateField(def: { kind: DMMF.FieldKind; type: string; isList: boolean; isRequired: boolean; name?: string }, modelName?: string) { + // For Json fields, check if there's a corresponding TypeDef in the original model + if (def.kind === 'scalar' && def.type === 'Json' && modelName && def.name) { + const dataModel = this.model.declarations.find(d => isDataModel(d) && d.name === modelName) as DataModel; + if (dataModel) { + const field = dataModel.fields.find(f => f.name === def.name); + if (field?.type.reference?.ref && isTypeDef(field.type.reference.ref)) { + // This Json field references a TypeDef + return this.wrapArray( + this.wrapNullable(this.ref(field.type.reference.ref.name, true), !def.isRequired), + def.isList + ); + } + } + } + switch (def.kind) { case 'scalar': return this.wrapArray(this.prismaTypeToOpenAPIType(def.type, !def.isRequired), def.isList); @@ -809,6 +839,52 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { return result; } + private generateTypeDefComponent(typeDef: TypeDef): OAPI.SchemaObject { + const schema: OAPI.SchemaObject = { + type: 'object', + description: `The "${typeDef.name}" TypeDef`, + properties: typeDef.fields.reduce((acc, field) => { + acc[field.name] = this.generateTypeDefField(field); + return acc; + }, {} as Record), + }; + + const required = typeDef.fields.filter((f) => !f.type.optional).map((f) => f.name); + if (required.length > 0) { + schema.required = required; + } + + return schema; + } + + private generateTypeDefField(field: TypeDefField): OAPI.ReferenceObject | OAPI.SchemaObject { + return this.wrapArray( + this.wrapNullable(this.typeDefFieldTypeToOpenAPISchema(field.type), field.type.optional), + field.type.array + ); + } + + private typeDefFieldTypeToOpenAPISchema(type: TypeDefFieldType): OAPI.ReferenceObject | OAPI.SchemaObject { + return match(type.type) + .with('String', () => ({ type: 'string' } as OAPI.SchemaObject)) + .with(P.union('Int', 'BigInt'), () => ({ type: 'integer' } as OAPI.SchemaObject)) + .with('Float', () => ({ type: 'number' } as OAPI.SchemaObject)) + .with('Decimal', () => this.oneOf({ type: 'string' }, { type: 'number' })) + .with('Boolean', () => ({ type: 'boolean' } as OAPI.SchemaObject)) + .with('DateTime', () => ({ type: 'string', format: 'date-time' } as OAPI.SchemaObject)) + .with('Bytes', () => ({ type: 'string', format: 'byte' } as OAPI.SchemaObject)) + .with('Json', () => ({ type: 'string', format: 'json' } as OAPI.SchemaObject)) + .otherwise(() => { + // It's a reference to another TypeDef, Enum, or Model + const fieldDecl = type.reference?.ref; + if (fieldDecl) { + return this.ref(fieldDecl.name, true); + } + // Fallback for unknown types + return { type: 'string' } as OAPI.SchemaObject; + }); + } + private setInputRequired(fields: readonly DMMF.SchemaArg[], result: OAPI.NonArraySchemaObject) { const required = fields.filter((f) => f.isRequired).map((f) => f.name); if (required.length > 0) { @@ -824,6 +900,9 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { } private prismaTypeToOpenAPIType(type: string, nullable: boolean): OAPI.ReferenceObject | OAPI.SchemaObject { + // Check if this type is a TypeDef + const isTypeDefType = this.model.declarations.some(d => isTypeDef(d) && d.name === type); + const result = match(type) .with('String', () => ({ type: 'string' })) .with(P.union('Int', 'BigInt'), () => ({ type: 'integer' })) @@ -832,7 +911,11 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { .with(P.union('Boolean', 'True'), () => ({ type: 'boolean' })) .with('DateTime', () => ({ type: 'string', format: 'date-time' })) .with('Bytes', () => ({ type: 'string', format: 'byte' })) - .with(P.union('JSON', 'Json'), () => ({})) + .with(P.union('JSON', 'Json'), () => { + // For Json fields, check if there's a specific TypeDef reference + // Otherwise, return empty schema for arbitrary JSON + return isTypeDefType ? this.ref(type, false) : {}; + }) .otherwise((type) => this.ref(type.toString(), false)); return this.wrapNullable(result, nullable); diff --git a/packages/plugins/openapi/tests/baseline/rpc-type-coverage-3.0.0.baseline.yaml b/packages/plugins/openapi/tests/baseline/rpc-type-coverage-3.0.0.baseline.yaml index 01c9a2d0f..2358128e2 100644 --- a/packages/plugins/openapi/tests/baseline/rpc-type-coverage-3.0.0.baseline.yaml +++ b/packages/plugins/openapi/tests/baseline/rpc-type-coverage-3.0.0.baseline.yaml @@ -1,2771 +1,3082 @@ openapi: 3.0.0 info: - title: ZenStack Generated API - version: 1.0.0 + title: ZenStack Generated API + version: 1.0.0 tags: - - name: foo - description: Foo operations + - name: foo + description: Foo operations components: - schemas: - FooScalarFieldEnum: + schemas: + FooScalarFieldEnum: + type: string + enum: + - id + - string + - int + - bigInt + - date + - float + - decimal + - boolean + - bytes + - json + - plainJson + SortOrder: + type: string + enum: + - asc + - desc + NullableJsonNullValueInput: + type: string + enum: + - DbNull + - JsonNull + JsonNullValueInput: + type: string + enum: + - JsonNull + QueryMode: + type: string + enum: + - default + - insensitive + JsonNullValueFilter: + type: string + enum: + - DbNull + - JsonNull + - AnyNull + NullsOrder: + type: string + enum: + - first + - last + Foo: + type: object + properties: + id: + type: string + string: + type: string + int: + type: integer + bigInt: + type: integer + date: + type: string + format: date-time + float: + type: number + decimal: + oneOf: + - type: string + - type: number + boolean: + type: boolean + bytes: + type: string + format: byte + nullable: true + json: + allOf: + - $ref: "#/components/schemas/Meta" + nullable: true + plainJson: {} + required: + - id + - string + - int + - bigInt + - date + - float + - decimal + - boolean + - plainJson + Meta: + type: object + description: The "Meta" TypeDef + properties: + something: + type: string + required: + - something + FooWhereInput: + type: object + properties: + AND: + oneOf: + - $ref: "#/components/schemas/FooWhereInput" + - type: array + items: + $ref: "#/components/schemas/FooWhereInput" + OR: + type: array + items: + $ref: "#/components/schemas/FooWhereInput" + NOT: + oneOf: + - $ref: "#/components/schemas/FooWhereInput" + - type: array + items: + $ref: "#/components/schemas/FooWhereInput" + id: + oneOf: + - $ref: "#/components/schemas/StringFilter" + - type: string + string: + oneOf: + - $ref: "#/components/schemas/StringFilter" + - type: string + int: + oneOf: + - $ref: "#/components/schemas/IntFilter" + - type: integer + bigInt: + oneOf: + - $ref: "#/components/schemas/BigIntFilter" + - type: integer + date: + oneOf: + - $ref: "#/components/schemas/DateTimeFilter" + - type: string + format: date-time + float: + oneOf: + - $ref: "#/components/schemas/FloatFilter" + - type: number + decimal: + oneOf: + - $ref: "#/components/schemas/DecimalFilter" + - oneOf: + - type: string + - type: number + boolean: + oneOf: + - $ref: "#/components/schemas/BoolFilter" + - type: boolean + bytes: + oneOf: + - $ref: "#/components/schemas/BytesNullableFilter" + - type: string + format: byte + nullable: true + json: + $ref: "#/components/schemas/JsonNullableFilter" + plainJson: + $ref: "#/components/schemas/JsonFilter" + FooOrderByWithRelationInput: + type: object + properties: + id: + $ref: "#/components/schemas/SortOrder" + string: + $ref: "#/components/schemas/SortOrder" + int: + $ref: "#/components/schemas/SortOrder" + bigInt: + $ref: "#/components/schemas/SortOrder" + date: + $ref: "#/components/schemas/SortOrder" + float: + $ref: "#/components/schemas/SortOrder" + decimal: + $ref: "#/components/schemas/SortOrder" + boolean: + $ref: "#/components/schemas/SortOrder" + bytes: + oneOf: + - $ref: "#/components/schemas/SortOrder" + - $ref: "#/components/schemas/SortOrderInput" + json: + oneOf: + - $ref: "#/components/schemas/SortOrder" + - $ref: "#/components/schemas/SortOrderInput" + plainJson: + $ref: "#/components/schemas/SortOrder" + FooWhereUniqueInput: + type: object + properties: + id: + type: string + AND: + oneOf: + - $ref: "#/components/schemas/FooWhereInput" + - type: array + items: + $ref: "#/components/schemas/FooWhereInput" + OR: + type: array + items: + $ref: "#/components/schemas/FooWhereInput" + NOT: + oneOf: + - $ref: "#/components/schemas/FooWhereInput" + - type: array + items: + $ref: "#/components/schemas/FooWhereInput" + string: + oneOf: + - $ref: "#/components/schemas/StringFilter" + - type: string + int: + oneOf: + - $ref: "#/components/schemas/IntFilter" + - type: integer + bigInt: + oneOf: + - $ref: "#/components/schemas/BigIntFilter" + - type: integer + date: + oneOf: + - $ref: "#/components/schemas/DateTimeFilter" + - type: string + format: date-time + float: + oneOf: + - $ref: "#/components/schemas/FloatFilter" + - type: number + decimal: + oneOf: + - $ref: "#/components/schemas/DecimalFilter" + - oneOf: + - type: string + - type: number + boolean: + oneOf: + - $ref: "#/components/schemas/BoolFilter" + - type: boolean + bytes: + oneOf: + - $ref: "#/components/schemas/BytesNullableFilter" + - type: string + format: byte + nullable: true + json: + $ref: "#/components/schemas/JsonNullableFilter" + plainJson: + $ref: "#/components/schemas/JsonFilter" + FooScalarWhereWithAggregatesInput: + type: object + properties: + AND: + oneOf: + - $ref: "#/components/schemas/FooScalarWhereWithAggregatesInput" + - type: array + items: + $ref: "#/components/schemas/FooScalarWhereWithAggregatesInput" + OR: + type: array + items: + $ref: "#/components/schemas/FooScalarWhereWithAggregatesInput" + NOT: + oneOf: + - $ref: "#/components/schemas/FooScalarWhereWithAggregatesInput" + - type: array + items: + $ref: "#/components/schemas/FooScalarWhereWithAggregatesInput" + id: + oneOf: + - $ref: "#/components/schemas/StringWithAggregatesFilter" + - type: string + string: + oneOf: + - $ref: "#/components/schemas/StringWithAggregatesFilter" + - type: string + int: + oneOf: + - $ref: "#/components/schemas/IntWithAggregatesFilter" + - type: integer + bigInt: + oneOf: + - $ref: "#/components/schemas/BigIntWithAggregatesFilter" + - type: integer + date: + oneOf: + - $ref: "#/components/schemas/DateTimeWithAggregatesFilter" + - type: string + format: date-time + float: + oneOf: + - $ref: "#/components/schemas/FloatWithAggregatesFilter" + - type: number + decimal: + oneOf: + - $ref: "#/components/schemas/DecimalWithAggregatesFilter" + - oneOf: + - type: string + - type: number + boolean: + oneOf: + - $ref: "#/components/schemas/BoolWithAggregatesFilter" + - type: boolean + bytes: + oneOf: + - $ref: "#/components/schemas/BytesNullableWithAggregatesFilter" + - type: string + format: byte + nullable: true + json: + $ref: "#/components/schemas/JsonNullableWithAggregatesFilter" + plainJson: + $ref: "#/components/schemas/JsonWithAggregatesFilter" + FooCreateInput: + type: object + properties: + id: + type: string + string: + type: string + int: + type: integer + bigInt: + type: integer + date: + type: string + format: date-time + float: + type: number + decimal: + oneOf: + - type: string + - type: number + boolean: + type: boolean + bytes: + type: string + format: byte + nullable: true + json: + oneOf: + - $ref: "#/components/schemas/NullableJsonNullValueInput" + - {} + plainJson: + oneOf: + - $ref: "#/components/schemas/JsonNullValueInput" + - {} + required: + - string + - int + - bigInt + - date + - float + - decimal + - boolean + - plainJson + FooUpdateInput: + type: object + properties: + id: + oneOf: + - type: string + - $ref: "#/components/schemas/StringFieldUpdateOperationsInput" + string: + oneOf: + - type: string + - $ref: "#/components/schemas/StringFieldUpdateOperationsInput" + int: + oneOf: + - type: integer + - $ref: "#/components/schemas/IntFieldUpdateOperationsInput" + bigInt: + oneOf: + - type: integer + - $ref: "#/components/schemas/BigIntFieldUpdateOperationsInput" + date: + oneOf: + - type: string + format: date-time + - $ref: "#/components/schemas/DateTimeFieldUpdateOperationsInput" + float: + oneOf: + - type: number + - $ref: "#/components/schemas/FloatFieldUpdateOperationsInput" + decimal: + oneOf: + - oneOf: + - type: string + - type: number + - $ref: "#/components/schemas/DecimalFieldUpdateOperationsInput" + boolean: + oneOf: + - type: boolean + - $ref: "#/components/schemas/BoolFieldUpdateOperationsInput" + bytes: + oneOf: + - type: string + format: byte + - $ref: "#/components/schemas/NullableBytesFieldUpdateOperationsInput" + nullable: true + json: + oneOf: + - $ref: "#/components/schemas/NullableJsonNullValueInput" + - {} + plainJson: + oneOf: + - $ref: "#/components/schemas/JsonNullValueInput" + - {} + FooCreateManyInput: + type: object + properties: + id: + type: string + string: + type: string + int: + type: integer + bigInt: + type: integer + date: + type: string + format: date-time + float: + type: number + decimal: + oneOf: + - type: string + - type: number + boolean: + type: boolean + bytes: + type: string + format: byte + nullable: true + json: + oneOf: + - $ref: "#/components/schemas/NullableJsonNullValueInput" + - {} + plainJson: + oneOf: + - $ref: "#/components/schemas/JsonNullValueInput" + - {} + required: + - string + - int + - bigInt + - date + - float + - decimal + - boolean + - plainJson + FooUpdateManyMutationInput: + type: object + properties: + id: + oneOf: + - type: string + - $ref: "#/components/schemas/StringFieldUpdateOperationsInput" + string: + oneOf: + - type: string + - $ref: "#/components/schemas/StringFieldUpdateOperationsInput" + int: + oneOf: + - type: integer + - $ref: "#/components/schemas/IntFieldUpdateOperationsInput" + bigInt: + oneOf: + - type: integer + - $ref: "#/components/schemas/BigIntFieldUpdateOperationsInput" + date: + oneOf: + - type: string + format: date-time + - $ref: "#/components/schemas/DateTimeFieldUpdateOperationsInput" + float: + oneOf: + - type: number + - $ref: "#/components/schemas/FloatFieldUpdateOperationsInput" + decimal: + oneOf: + - oneOf: + - type: string + - type: number + - $ref: "#/components/schemas/DecimalFieldUpdateOperationsInput" + boolean: + oneOf: + - type: boolean + - $ref: "#/components/schemas/BoolFieldUpdateOperationsInput" + bytes: + oneOf: + - type: string + format: byte + - $ref: "#/components/schemas/NullableBytesFieldUpdateOperationsInput" + nullable: true + json: + oneOf: + - $ref: "#/components/schemas/NullableJsonNullValueInput" + - {} + plainJson: + oneOf: + - $ref: "#/components/schemas/JsonNullValueInput" + - {} + StringFilter: + type: object + properties: + equals: + type: string + in: + type: array + items: type: string - enum: - - id - - string - - int - - bigInt - - date - - float - - decimal - - boolean - - bytes - SortOrder: + notIn: + type: array + items: type: string - enum: - - asc - - desc - QueryMode: + lt: + type: string + lte: + type: string + gt: + type: string + gte: + type: string + contains: + type: string + startsWith: + type: string + endsWith: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + not: + oneOf: + - type: string + - $ref: "#/components/schemas/NestedStringFilter" + IntFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedIntFilter" + BigIntFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedBigIntFilter" + DateTimeFilter: + type: object + properties: + equals: + type: string + format: date-time + in: + type: array + items: type: string - enum: - - default - - insensitive - NullsOrder: + format: date-time + notIn: + type: array + items: type: string - enum: - - first - - last - Foo: - type: object - properties: - id: - type: string - string: - type: string - int: - type: integer - bigInt: - type: integer - date: - type: string - format: date-time - float: - type: number - decimal: - oneOf: - - type: string - - type: number - boolean: - type: boolean - bytes: - type: string - format: byte - nullable: true - required: - - id - - string - - int - - bigInt - - date - - float - - decimal - - boolean - FooWhereInput: - type: object - properties: - AND: - oneOf: - - $ref: '#/components/schemas/FooWhereInput' - - type: array - items: - $ref: '#/components/schemas/FooWhereInput' - OR: - type: array - items: - $ref: '#/components/schemas/FooWhereInput' - NOT: - oneOf: - - $ref: '#/components/schemas/FooWhereInput' - - type: array - items: - $ref: '#/components/schemas/FooWhereInput' - id: - oneOf: - - $ref: '#/components/schemas/StringFilter' - - type: string - string: - oneOf: - - $ref: '#/components/schemas/StringFilter' - - type: string - int: - oneOf: - - $ref: '#/components/schemas/IntFilter' - - type: integer - bigInt: - oneOf: - - $ref: '#/components/schemas/BigIntFilter' - - type: integer - date: - oneOf: - - $ref: '#/components/schemas/DateTimeFilter' - - type: string - format: date-time - float: - oneOf: - - $ref: '#/components/schemas/FloatFilter' - - type: number - decimal: - oneOf: - - $ref: '#/components/schemas/DecimalFilter' - - oneOf: - - type: string - - type: number - boolean: - oneOf: - - $ref: '#/components/schemas/BoolFilter' - - type: boolean - bytes: - oneOf: - - $ref: '#/components/schemas/BytesNullableFilter' - - type: string - format: byte - nullable: true - FooOrderByWithRelationInput: - type: object - properties: - id: - $ref: '#/components/schemas/SortOrder' - string: - $ref: '#/components/schemas/SortOrder' - int: - $ref: '#/components/schemas/SortOrder' - bigInt: - $ref: '#/components/schemas/SortOrder' - date: - $ref: '#/components/schemas/SortOrder' - float: - $ref: '#/components/schemas/SortOrder' - decimal: - $ref: '#/components/schemas/SortOrder' - boolean: - $ref: '#/components/schemas/SortOrder' - bytes: - oneOf: - - $ref: '#/components/schemas/SortOrder' - - $ref: '#/components/schemas/SortOrderInput' - FooWhereUniqueInput: - type: object - properties: - id: - type: string - AND: - oneOf: - - $ref: '#/components/schemas/FooWhereInput' - - type: array - items: - $ref: '#/components/schemas/FooWhereInput' - OR: - type: array - items: - $ref: '#/components/schemas/FooWhereInput' - NOT: - oneOf: - - $ref: '#/components/schemas/FooWhereInput' - - type: array - items: - $ref: '#/components/schemas/FooWhereInput' - string: - oneOf: - - $ref: '#/components/schemas/StringFilter' - - type: string - int: - oneOf: - - $ref: '#/components/schemas/IntFilter' - - type: integer - bigInt: - oneOf: - - $ref: '#/components/schemas/BigIntFilter' - - type: integer - date: - oneOf: - - $ref: '#/components/schemas/DateTimeFilter' - - type: string - format: date-time - float: - oneOf: - - $ref: '#/components/schemas/FloatFilter' - - type: number - decimal: - oneOf: - - $ref: '#/components/schemas/DecimalFilter' - - oneOf: - - type: string - - type: number - boolean: - oneOf: - - $ref: '#/components/schemas/BoolFilter' - - type: boolean - bytes: - oneOf: - - $ref: '#/components/schemas/BytesNullableFilter' - - type: string - format: byte - nullable: true - FooScalarWhereWithAggregatesInput: - type: object - properties: - AND: - oneOf: - - $ref: '#/components/schemas/FooScalarWhereWithAggregatesInput' - - type: array - items: - $ref: '#/components/schemas/FooScalarWhereWithAggregatesInput' - OR: - type: array - items: - $ref: '#/components/schemas/FooScalarWhereWithAggregatesInput' - NOT: - oneOf: - - $ref: '#/components/schemas/FooScalarWhereWithAggregatesInput' - - type: array - items: - $ref: '#/components/schemas/FooScalarWhereWithAggregatesInput' - id: - oneOf: - - $ref: '#/components/schemas/StringWithAggregatesFilter' - - type: string - string: - oneOf: - - $ref: '#/components/schemas/StringWithAggregatesFilter' - - type: string - int: - oneOf: - - $ref: '#/components/schemas/IntWithAggregatesFilter' - - type: integer - bigInt: - oneOf: - - $ref: '#/components/schemas/BigIntWithAggregatesFilter' - - type: integer - date: - oneOf: - - $ref: '#/components/schemas/DateTimeWithAggregatesFilter' - - type: string - format: date-time - float: - oneOf: - - $ref: '#/components/schemas/FloatWithAggregatesFilter' - - type: number - decimal: - oneOf: - - $ref: '#/components/schemas/DecimalWithAggregatesFilter' - - oneOf: - - type: string - - type: number - boolean: - oneOf: - - $ref: '#/components/schemas/BoolWithAggregatesFilter' - - type: boolean - bytes: - oneOf: - - $ref: '#/components/schemas/BytesNullableWithAggregatesFilter' - - type: string - format: byte - nullable: true - FooCreateInput: - type: object - properties: - id: - type: string - string: - type: string - int: - type: integer - bigInt: - type: integer - date: - type: string - format: date-time - float: - type: number - decimal: - oneOf: - - type: string - - type: number - boolean: - type: boolean - bytes: - type: string - format: byte - nullable: true - required: - - string - - int - - bigInt - - date - - float - - decimal - - boolean - FooUpdateInput: - type: object - properties: - id: - oneOf: - - type: string - - $ref: '#/components/schemas/StringFieldUpdateOperationsInput' - string: - oneOf: - - type: string - - $ref: '#/components/schemas/StringFieldUpdateOperationsInput' - int: - oneOf: - - type: integer - - $ref: '#/components/schemas/IntFieldUpdateOperationsInput' - bigInt: - oneOf: - - type: integer - - $ref: '#/components/schemas/BigIntFieldUpdateOperationsInput' - date: - oneOf: - - type: string - format: date-time - - $ref: '#/components/schemas/DateTimeFieldUpdateOperationsInput' - float: - oneOf: - - type: number - - $ref: '#/components/schemas/FloatFieldUpdateOperationsInput' - decimal: - oneOf: - - oneOf: - - type: string - - type: number - - $ref: '#/components/schemas/DecimalFieldUpdateOperationsInput' - boolean: - oneOf: - - type: boolean - - $ref: '#/components/schemas/BoolFieldUpdateOperationsInput' - bytes: - oneOf: - - type: string - format: byte - - $ref: '#/components/schemas/NullableBytesFieldUpdateOperationsInput' - nullable: true - FooCreateManyInput: - type: object - properties: - id: - type: string - string: - type: string - int: - type: integer - bigInt: - type: integer - date: - type: string - format: date-time - float: - type: number - decimal: - oneOf: - - type: string - - type: number - boolean: - type: boolean - bytes: - type: string - format: byte - nullable: true - required: - - string - - int - - bigInt - - date - - float - - decimal - - boolean - FooUpdateManyMutationInput: - type: object - properties: - id: - oneOf: - - type: string - - $ref: '#/components/schemas/StringFieldUpdateOperationsInput' - string: - oneOf: - - type: string - - $ref: '#/components/schemas/StringFieldUpdateOperationsInput' - int: - oneOf: - - type: integer - - $ref: '#/components/schemas/IntFieldUpdateOperationsInput' - bigInt: - oneOf: - - type: integer - - $ref: '#/components/schemas/BigIntFieldUpdateOperationsInput' - date: - oneOf: - - type: string - format: date-time - - $ref: '#/components/schemas/DateTimeFieldUpdateOperationsInput' - float: - oneOf: - - type: number - - $ref: '#/components/schemas/FloatFieldUpdateOperationsInput' - decimal: - oneOf: - - oneOf: - - type: string - - type: number - - $ref: '#/components/schemas/DecimalFieldUpdateOperationsInput' - boolean: - oneOf: - - type: boolean - - $ref: '#/components/schemas/BoolFieldUpdateOperationsInput' - bytes: - oneOf: - - type: string - format: byte - - $ref: '#/components/schemas/NullableBytesFieldUpdateOperationsInput' - nullable: true - StringFilter: - type: object - properties: - equals: - type: string - in: - type: array - items: - type: string - notIn: - type: array - items: - type: string - lt: - type: string - lte: - type: string - gt: - type: string - gte: - type: string - contains: - type: string - startsWith: - type: string - endsWith: - type: string - mode: - $ref: '#/components/schemas/QueryMode' - not: - oneOf: - - type: string - - $ref: '#/components/schemas/NestedStringFilter' - IntFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedIntFilter' - BigIntFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedBigIntFilter' - DateTimeFilter: - type: object - properties: - equals: - type: string - format: date-time - in: - type: array - items: - type: string - format: date-time - notIn: - type: array - items: - type: string - format: date-time - lt: - type: string - format: date-time - lte: - type: string - format: date-time - gt: - type: string - format: date-time - gte: - type: string - format: date-time - not: - oneOf: - - type: string - format: date-time - - $ref: '#/components/schemas/NestedDateTimeFilter' - FloatFilter: - type: object - properties: - equals: - type: number - in: - type: array - items: - type: number - notIn: - type: array - items: - type: number - lt: - type: number - lte: - type: number - gt: - type: number - gte: - type: number - not: - oneOf: - - type: number - - $ref: '#/components/schemas/NestedFloatFilter' - DecimalFilter: - type: object - properties: - equals: - oneOf: - - type: string - - type: number - in: - type: array - items: - oneOf: - - type: string - - type: number - notIn: - type: array - items: - oneOf: - - type: string - - type: number - lt: - oneOf: - - type: string - - type: number - lte: - oneOf: - - type: string - - type: number - gt: - oneOf: - - type: string - - type: number - gte: - oneOf: - - type: string - - type: number - not: - oneOf: - - oneOf: - - type: string - - type: number - - $ref: '#/components/schemas/NestedDecimalFilter' - BoolFilter: - type: object - properties: - equals: - type: boolean - not: - oneOf: - - type: boolean - - $ref: '#/components/schemas/NestedBoolFilter' - BytesNullableFilter: - type: object - properties: - equals: - type: string - format: byte - nullable: true - in: - type: array - items: - type: string - format: byte - nullable: true - notIn: - type: array - items: - type: string - format: byte - nullable: true - not: - oneOf: - - type: string - format: byte - - $ref: '#/components/schemas/NestedBytesNullableFilter' - nullable: true - SortOrderInput: - type: object - properties: - sort: - $ref: '#/components/schemas/SortOrder' - nulls: - $ref: '#/components/schemas/NullsOrder' - required: - - sort - StringWithAggregatesFilter: - type: object - properties: - equals: - type: string - in: - type: array - items: - type: string - notIn: - type: array - items: - type: string - lt: - type: string - lte: - type: string - gt: - type: string - gte: - type: string - contains: - type: string - startsWith: - type: string - endsWith: - type: string - mode: - $ref: '#/components/schemas/QueryMode' - not: - oneOf: - - type: string - - $ref: '#/components/schemas/NestedStringWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedStringFilter' - _max: - $ref: '#/components/schemas/NestedStringFilter' - IntWithAggregatesFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedIntWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedFloatFilter' - _sum: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedIntFilter' - _max: - $ref: '#/components/schemas/NestedIntFilter' - BigIntWithAggregatesFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedBigIntWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedFloatFilter' - _sum: - $ref: '#/components/schemas/NestedBigIntFilter' - _min: - $ref: '#/components/schemas/NestedBigIntFilter' - _max: - $ref: '#/components/schemas/NestedBigIntFilter' - DateTimeWithAggregatesFilter: - type: object - properties: - equals: - type: string - format: date-time - in: - type: array - items: - type: string - format: date-time - notIn: - type: array - items: - type: string - format: date-time - lt: - type: string - format: date-time - lte: - type: string - format: date-time - gt: - type: string - format: date-time - gte: - type: string - format: date-time - not: - oneOf: - - type: string - format: date-time - - $ref: '#/components/schemas/NestedDateTimeWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedDateTimeFilter' - _max: - $ref: '#/components/schemas/NestedDateTimeFilter' - FloatWithAggregatesFilter: - type: object - properties: - equals: - type: number - in: - type: array - items: - type: number - notIn: - type: array - items: - type: number - lt: - type: number - lte: - type: number - gt: - type: number - gte: - type: number - not: - oneOf: - - type: number - - $ref: '#/components/schemas/NestedFloatWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedFloatFilter' - _sum: - $ref: '#/components/schemas/NestedFloatFilter' - _min: - $ref: '#/components/schemas/NestedFloatFilter' - _max: - $ref: '#/components/schemas/NestedFloatFilter' - DecimalWithAggregatesFilter: - type: object - properties: - equals: - oneOf: - - type: string - - type: number - in: - type: array - items: - oneOf: - - type: string - - type: number - notIn: - type: array - items: - oneOf: - - type: string - - type: number - lt: - oneOf: - - type: string - - type: number - lte: - oneOf: - - type: string - - type: number - gt: - oneOf: - - type: string - - type: number - gte: - oneOf: - - type: string - - type: number - not: - oneOf: - - oneOf: - - type: string - - type: number - - $ref: '#/components/schemas/NestedDecimalWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedDecimalFilter' - _sum: - $ref: '#/components/schemas/NestedDecimalFilter' - _min: - $ref: '#/components/schemas/NestedDecimalFilter' - _max: - $ref: '#/components/schemas/NestedDecimalFilter' - BoolWithAggregatesFilter: - type: object - properties: - equals: - type: boolean - not: - oneOf: - - type: boolean - - $ref: '#/components/schemas/NestedBoolWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedBoolFilter' - _max: - $ref: '#/components/schemas/NestedBoolFilter' - BytesNullableWithAggregatesFilter: - type: object - properties: - equals: - type: string - format: byte - nullable: true - in: - type: array - items: - type: string - format: byte - nullable: true - notIn: - type: array - items: - type: string - format: byte - nullable: true - not: - oneOf: - - type: string - format: byte - - $ref: '#/components/schemas/NestedBytesNullableWithAggregatesFilter' - nullable: true - _count: - $ref: '#/components/schemas/NestedIntNullableFilter' - _min: - $ref: '#/components/schemas/NestedBytesNullableFilter' - _max: - $ref: '#/components/schemas/NestedBytesNullableFilter' - StringFieldUpdateOperationsInput: - type: object - properties: - set: - type: string - IntFieldUpdateOperationsInput: - type: object - properties: - set: - type: integer - increment: - type: integer - decrement: - type: integer - multiply: - type: integer - divide: - type: integer - BigIntFieldUpdateOperationsInput: - type: object - properties: - set: - type: integer - increment: - type: integer - decrement: - type: integer - multiply: - type: integer - divide: - type: integer - DateTimeFieldUpdateOperationsInput: - type: object - properties: - set: - type: string - format: date-time - FloatFieldUpdateOperationsInput: - type: object - properties: - set: - type: number - increment: - type: number - decrement: - type: number - multiply: - type: number - divide: - type: number - DecimalFieldUpdateOperationsInput: - type: object - properties: - set: - oneOf: - - type: string - - type: number - increment: - oneOf: - - type: string - - type: number - decrement: - oneOf: - - type: string - - type: number - multiply: - oneOf: - - type: string - - type: number - divide: - oneOf: - - type: string - - type: number - BoolFieldUpdateOperationsInput: - type: object - properties: - set: - type: boolean - NullableBytesFieldUpdateOperationsInput: - type: object - properties: - set: - type: string - format: byte - nullable: true - NestedStringFilter: - type: object - properties: - equals: - type: string - in: - type: array - items: - type: string - notIn: - type: array - items: - type: string - lt: - type: string - lte: - type: string - gt: - type: string - gte: - type: string - contains: - type: string - startsWith: - type: string - endsWith: - type: string - not: - oneOf: - - type: string - - $ref: '#/components/schemas/NestedStringFilter' - NestedIntFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedIntFilter' - NestedBigIntFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedBigIntFilter' - NestedDateTimeFilter: - type: object - properties: - equals: - type: string - format: date-time - in: - type: array - items: - type: string - format: date-time - notIn: - type: array - items: - type: string - format: date-time - lt: - type: string - format: date-time - lte: - type: string - format: date-time - gt: - type: string - format: date-time - gte: - type: string - format: date-time - not: - oneOf: - - type: string - format: date-time - - $ref: '#/components/schemas/NestedDateTimeFilter' - NestedFloatFilter: - type: object - properties: - equals: - type: number - in: - type: array - items: - type: number - notIn: - type: array - items: - type: number - lt: - type: number - lte: - type: number - gt: - type: number - gte: - type: number - not: - oneOf: - - type: number - - $ref: '#/components/schemas/NestedFloatFilter' - NestedDecimalFilter: - type: object - properties: - equals: - oneOf: - - type: string - - type: number - in: - type: array - items: - oneOf: - - type: string - - type: number - notIn: - type: array - items: - oneOf: - - type: string - - type: number - lt: - oneOf: - - type: string - - type: number - lte: - oneOf: - - type: string - - type: number - gt: - oneOf: - - type: string - - type: number - gte: - oneOf: - - type: string - - type: number - not: - oneOf: - - oneOf: - - type: string - - type: number - - $ref: '#/components/schemas/NestedDecimalFilter' - NestedBoolFilter: - type: object - properties: - equals: - type: boolean - not: - oneOf: - - type: boolean - - $ref: '#/components/schemas/NestedBoolFilter' - NestedBytesNullableFilter: - type: object - properties: - equals: - type: string - format: byte - nullable: true - in: - type: array - items: - type: string - format: byte - nullable: true - notIn: - type: array - items: - type: string - format: byte - nullable: true - not: - oneOf: - - type: string - format: byte - - $ref: '#/components/schemas/NestedBytesNullableFilter' - nullable: true - NestedStringWithAggregatesFilter: - type: object - properties: - equals: - type: string - in: - type: array - items: - type: string - notIn: - type: array - items: - type: string - lt: - type: string - lte: - type: string - gt: - type: string - gte: - type: string - contains: - type: string - startsWith: - type: string - endsWith: - type: string - not: - oneOf: - - type: string - - $ref: '#/components/schemas/NestedStringWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedStringFilter' - _max: - $ref: '#/components/schemas/NestedStringFilter' - NestedIntWithAggregatesFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedIntWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedFloatFilter' - _sum: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedIntFilter' - _max: - $ref: '#/components/schemas/NestedIntFilter' - NestedBigIntWithAggregatesFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedBigIntWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedFloatFilter' - _sum: - $ref: '#/components/schemas/NestedBigIntFilter' - _min: - $ref: '#/components/schemas/NestedBigIntFilter' - _max: - $ref: '#/components/schemas/NestedBigIntFilter' - NestedDateTimeWithAggregatesFilter: - type: object - properties: - equals: - type: string - format: date-time - in: - type: array - items: - type: string - format: date-time - notIn: - type: array - items: - type: string - format: date-time - lt: - type: string - format: date-time - lte: - type: string - format: date-time - gt: - type: string - format: date-time - gte: - type: string - format: date-time - not: - oneOf: - - type: string - format: date-time - - $ref: '#/components/schemas/NestedDateTimeWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedDateTimeFilter' - _max: - $ref: '#/components/schemas/NestedDateTimeFilter' - NestedFloatWithAggregatesFilter: - type: object - properties: - equals: - type: number - in: - type: array - items: - type: number - notIn: - type: array - items: - type: number - lt: - type: number - lte: - type: number - gt: - type: number - gte: - type: number - not: - oneOf: - - type: number - - $ref: '#/components/schemas/NestedFloatWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedFloatFilter' - _sum: - $ref: '#/components/schemas/NestedFloatFilter' - _min: - $ref: '#/components/schemas/NestedFloatFilter' - _max: - $ref: '#/components/schemas/NestedFloatFilter' - NestedDecimalWithAggregatesFilter: - type: object - properties: - equals: - oneOf: - - type: string - - type: number - in: - type: array - items: - oneOf: - - type: string - - type: number - notIn: - type: array - items: - oneOf: - - type: string - - type: number - lt: - oneOf: - - type: string - - type: number - lte: - oneOf: - - type: string - - type: number - gt: - oneOf: - - type: string - - type: number - gte: - oneOf: - - type: string - - type: number - not: - oneOf: - - oneOf: - - type: string - - type: number - - $ref: '#/components/schemas/NestedDecimalWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedDecimalFilter' - _sum: - $ref: '#/components/schemas/NestedDecimalFilter' - _min: - $ref: '#/components/schemas/NestedDecimalFilter' - _max: - $ref: '#/components/schemas/NestedDecimalFilter' - NestedBoolWithAggregatesFilter: - type: object - properties: - equals: - type: boolean - not: - oneOf: - - type: boolean - - $ref: '#/components/schemas/NestedBoolWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedBoolFilter' - _max: - $ref: '#/components/schemas/NestedBoolFilter' - NestedBytesNullableWithAggregatesFilter: - type: object - properties: - equals: - type: string - format: byte - nullable: true - in: - type: array - items: - type: string - format: byte - nullable: true - notIn: - type: array - items: - type: string - format: byte - nullable: true - not: - oneOf: - - type: string - format: byte - - $ref: '#/components/schemas/NestedBytesNullableWithAggregatesFilter' - nullable: true - _count: - $ref: '#/components/schemas/NestedIntNullableFilter' - _min: - $ref: '#/components/schemas/NestedBytesNullableFilter' - _max: - $ref: '#/components/schemas/NestedBytesNullableFilter' - NestedIntNullableFilter: - type: object - properties: - equals: - type: integer - nullable: true - in: + format: date-time + lt: + type: string + format: date-time + lte: + type: string + format: date-time + gt: + type: string + format: date-time + gte: + type: string + format: date-time + not: + oneOf: + - type: string + format: date-time + - $ref: "#/components/schemas/NestedDateTimeFilter" + FloatFilter: + type: object + properties: + equals: + type: number + in: + type: array + items: + type: number + notIn: + type: array + items: + type: number + lt: + type: number + lte: + type: number + gt: + type: number + gte: + type: number + not: + oneOf: + - type: number + - $ref: "#/components/schemas/NestedFloatFilter" + DecimalFilter: + type: object + properties: + equals: + oneOf: + - type: string + - type: number + in: + type: array + items: + oneOf: + - type: string + - type: number + notIn: + type: array + items: + oneOf: + - type: string + - type: number + lt: + oneOf: + - type: string + - type: number + lte: + oneOf: + - type: string + - type: number + gt: + oneOf: + - type: string + - type: number + gte: + oneOf: + - type: string + - type: number + not: + oneOf: + - oneOf: + - type: string + - type: number + - $ref: "#/components/schemas/NestedDecimalFilter" + BoolFilter: + type: object + properties: + equals: + type: boolean + not: + oneOf: + - type: boolean + - $ref: "#/components/schemas/NestedBoolFilter" + BytesNullableFilter: + type: object + properties: + equals: + type: string + format: byte + nullable: true + in: + type: array + items: + type: string + format: byte + nullable: true + notIn: + type: array + items: + type: string + format: byte + nullable: true + not: + oneOf: + - type: string + format: byte + - $ref: "#/components/schemas/NestedBytesNullableFilter" + nullable: true + JsonNullableFilter: + type: object + properties: + equals: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + path: + type: array + items: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + string_contains: + type: string + string_starts_with: + type: string + string_ends_with: + type: string + array_starts_with: + nullable: true + array_ends_with: + nullable: true + array_contains: + nullable: true + lt: {} + lte: {} + gt: {} + gte: {} + not: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + JsonFilter: + type: object + properties: + equals: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + path: + type: array + items: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + string_contains: + type: string + string_starts_with: + type: string + string_ends_with: + type: string + array_starts_with: + nullable: true + array_ends_with: + nullable: true + array_contains: + nullable: true + lt: {} + lte: {} + gt: {} + gte: {} + not: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + SortOrderInput: + type: object + properties: + sort: + $ref: "#/components/schemas/SortOrder" + nulls: + $ref: "#/components/schemas/NullsOrder" + required: + - sort + StringWithAggregatesFilter: + type: object + properties: + equals: + type: string + in: + type: array + items: + type: string + notIn: + type: array + items: + type: string + lt: + type: string + lte: + type: string + gt: + type: string + gte: + type: string + contains: + type: string + startsWith: + type: string + endsWith: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + not: + oneOf: + - type: string + - $ref: "#/components/schemas/NestedStringWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedStringFilter" + _max: + $ref: "#/components/schemas/NestedStringFilter" + IntWithAggregatesFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedIntWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedFloatFilter" + _sum: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedIntFilter" + _max: + $ref: "#/components/schemas/NestedIntFilter" + BigIntWithAggregatesFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedBigIntWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedFloatFilter" + _sum: + $ref: "#/components/schemas/NestedBigIntFilter" + _min: + $ref: "#/components/schemas/NestedBigIntFilter" + _max: + $ref: "#/components/schemas/NestedBigIntFilter" + DateTimeWithAggregatesFilter: + type: object + properties: + equals: + type: string + format: date-time + in: + type: array + items: + type: string + format: date-time + notIn: + type: array + items: + type: string + format: date-time + lt: + type: string + format: date-time + lte: + type: string + format: date-time + gt: + type: string + format: date-time + gte: + type: string + format: date-time + not: + oneOf: + - type: string + format: date-time + - $ref: "#/components/schemas/NestedDateTimeWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedDateTimeFilter" + _max: + $ref: "#/components/schemas/NestedDateTimeFilter" + FloatWithAggregatesFilter: + type: object + properties: + equals: + type: number + in: + type: array + items: + type: number + notIn: + type: array + items: + type: number + lt: + type: number + lte: + type: number + gt: + type: number + gte: + type: number + not: + oneOf: + - type: number + - $ref: "#/components/schemas/NestedFloatWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedFloatFilter" + _sum: + $ref: "#/components/schemas/NestedFloatFilter" + _min: + $ref: "#/components/schemas/NestedFloatFilter" + _max: + $ref: "#/components/schemas/NestedFloatFilter" + DecimalWithAggregatesFilter: + type: object + properties: + equals: + oneOf: + - type: string + - type: number + in: + type: array + items: + oneOf: + - type: string + - type: number + notIn: + type: array + items: + oneOf: + - type: string + - type: number + lt: + oneOf: + - type: string + - type: number + lte: + oneOf: + - type: string + - type: number + gt: + oneOf: + - type: string + - type: number + gte: + oneOf: + - type: string + - type: number + not: + oneOf: + - oneOf: + - type: string + - type: number + - $ref: "#/components/schemas/NestedDecimalWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedDecimalFilter" + _sum: + $ref: "#/components/schemas/NestedDecimalFilter" + _min: + $ref: "#/components/schemas/NestedDecimalFilter" + _max: + $ref: "#/components/schemas/NestedDecimalFilter" + BoolWithAggregatesFilter: + type: object + properties: + equals: + type: boolean + not: + oneOf: + - type: boolean + - $ref: "#/components/schemas/NestedBoolWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedBoolFilter" + _max: + $ref: "#/components/schemas/NestedBoolFilter" + BytesNullableWithAggregatesFilter: + type: object + properties: + equals: + type: string + format: byte + nullable: true + in: + type: array + items: + type: string + format: byte + nullable: true + notIn: + type: array + items: + type: string + format: byte + nullable: true + not: + oneOf: + - type: string + format: byte + - $ref: "#/components/schemas/NestedBytesNullableWithAggregatesFilter" + nullable: true + _count: + $ref: "#/components/schemas/NestedIntNullableFilter" + _min: + $ref: "#/components/schemas/NestedBytesNullableFilter" + _max: + $ref: "#/components/schemas/NestedBytesNullableFilter" + JsonNullableWithAggregatesFilter: + type: object + properties: + equals: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + path: + type: array + items: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + string_contains: + type: string + string_starts_with: + type: string + string_ends_with: + type: string + array_starts_with: + nullable: true + array_ends_with: + nullable: true + array_contains: + nullable: true + lt: {} + lte: {} + gt: {} + gte: {} + not: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + _count: + $ref: "#/components/schemas/NestedIntNullableFilter" + _min: + $ref: "#/components/schemas/NestedJsonNullableFilter" + _max: + $ref: "#/components/schemas/NestedJsonNullableFilter" + JsonWithAggregatesFilter: + type: object + properties: + equals: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + path: + type: array + items: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + string_contains: + type: string + string_starts_with: + type: string + string_ends_with: + type: string + array_starts_with: + nullable: true + array_ends_with: + nullable: true + array_contains: + nullable: true + lt: {} + lte: {} + gt: {} + gte: {} + not: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedJsonFilter" + _max: + $ref: "#/components/schemas/NestedJsonFilter" + StringFieldUpdateOperationsInput: + type: object + properties: + set: + type: string + IntFieldUpdateOperationsInput: + type: object + properties: + set: + type: integer + increment: + type: integer + decrement: + type: integer + multiply: + type: integer + divide: + type: integer + BigIntFieldUpdateOperationsInput: + type: object + properties: + set: + type: integer + increment: + type: integer + decrement: + type: integer + multiply: + type: integer + divide: + type: integer + DateTimeFieldUpdateOperationsInput: + type: object + properties: + set: + type: string + format: date-time + FloatFieldUpdateOperationsInput: + type: object + properties: + set: + type: number + increment: + type: number + decrement: + type: number + multiply: + type: number + divide: + type: number + DecimalFieldUpdateOperationsInput: + type: object + properties: + set: + oneOf: + - type: string + - type: number + increment: + oneOf: + - type: string + - type: number + decrement: + oneOf: + - type: string + - type: number + multiply: + oneOf: + - type: string + - type: number + divide: + oneOf: + - type: string + - type: number + BoolFieldUpdateOperationsInput: + type: object + properties: + set: + type: boolean + NullableBytesFieldUpdateOperationsInput: + type: object + properties: + set: + type: string + format: byte + nullable: true + NestedStringFilter: + type: object + properties: + equals: + type: string + in: + type: array + items: + type: string + notIn: + type: array + items: + type: string + lt: + type: string + lte: + type: string + gt: + type: string + gte: + type: string + contains: + type: string + startsWith: + type: string + endsWith: + type: string + not: + oneOf: + - type: string + - $ref: "#/components/schemas/NestedStringFilter" + NestedIntFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedIntFilter" + NestedBigIntFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedBigIntFilter" + NestedDateTimeFilter: + type: object + properties: + equals: + type: string + format: date-time + in: + type: array + items: + type: string + format: date-time + notIn: + type: array + items: + type: string + format: date-time + lt: + type: string + format: date-time + lte: + type: string + format: date-time + gt: + type: string + format: date-time + gte: + type: string + format: date-time + not: + oneOf: + - type: string + format: date-time + - $ref: "#/components/schemas/NestedDateTimeFilter" + NestedFloatFilter: + type: object + properties: + equals: + type: number + in: + type: array + items: + type: number + notIn: + type: array + items: + type: number + lt: + type: number + lte: + type: number + gt: + type: number + gte: + type: number + not: + oneOf: + - type: number + - $ref: "#/components/schemas/NestedFloatFilter" + NestedDecimalFilter: + type: object + properties: + equals: + oneOf: + - type: string + - type: number + in: + type: array + items: + oneOf: + - type: string + - type: number + notIn: + type: array + items: + oneOf: + - type: string + - type: number + lt: + oneOf: + - type: string + - type: number + lte: + oneOf: + - type: string + - type: number + gt: + oneOf: + - type: string + - type: number + gte: + oneOf: + - type: string + - type: number + not: + oneOf: + - oneOf: + - type: string + - type: number + - $ref: "#/components/schemas/NestedDecimalFilter" + NestedBoolFilter: + type: object + properties: + equals: + type: boolean + not: + oneOf: + - type: boolean + - $ref: "#/components/schemas/NestedBoolFilter" + NestedBytesNullableFilter: + type: object + properties: + equals: + type: string + format: byte + nullable: true + in: + type: array + items: + type: string + format: byte + nullable: true + notIn: + type: array + items: + type: string + format: byte + nullable: true + not: + oneOf: + - type: string + format: byte + - $ref: "#/components/schemas/NestedBytesNullableFilter" + nullable: true + NestedStringWithAggregatesFilter: + type: object + properties: + equals: + type: string + in: + type: array + items: + type: string + notIn: + type: array + items: + type: string + lt: + type: string + lte: + type: string + gt: + type: string + gte: + type: string + contains: + type: string + startsWith: + type: string + endsWith: + type: string + not: + oneOf: + - type: string + - $ref: "#/components/schemas/NestedStringWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedStringFilter" + _max: + $ref: "#/components/schemas/NestedStringFilter" + NestedIntWithAggregatesFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedIntWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedFloatFilter" + _sum: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedIntFilter" + _max: + $ref: "#/components/schemas/NestedIntFilter" + NestedBigIntWithAggregatesFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedBigIntWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedFloatFilter" + _sum: + $ref: "#/components/schemas/NestedBigIntFilter" + _min: + $ref: "#/components/schemas/NestedBigIntFilter" + _max: + $ref: "#/components/schemas/NestedBigIntFilter" + NestedDateTimeWithAggregatesFilter: + type: object + properties: + equals: + type: string + format: date-time + in: + type: array + items: + type: string + format: date-time + notIn: + type: array + items: + type: string + format: date-time + lt: + type: string + format: date-time + lte: + type: string + format: date-time + gt: + type: string + format: date-time + gte: + type: string + format: date-time + not: + oneOf: + - type: string + format: date-time + - $ref: "#/components/schemas/NestedDateTimeWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedDateTimeFilter" + _max: + $ref: "#/components/schemas/NestedDateTimeFilter" + NestedFloatWithAggregatesFilter: + type: object + properties: + equals: + type: number + in: + type: array + items: + type: number + notIn: + type: array + items: + type: number + lt: + type: number + lte: + type: number + gt: + type: number + gte: + type: number + not: + oneOf: + - type: number + - $ref: "#/components/schemas/NestedFloatWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedFloatFilter" + _sum: + $ref: "#/components/schemas/NestedFloatFilter" + _min: + $ref: "#/components/schemas/NestedFloatFilter" + _max: + $ref: "#/components/schemas/NestedFloatFilter" + NestedDecimalWithAggregatesFilter: + type: object + properties: + equals: + oneOf: + - type: string + - type: number + in: + type: array + items: + oneOf: + - type: string + - type: number + notIn: + type: array + items: + oneOf: + - type: string + - type: number + lt: + oneOf: + - type: string + - type: number + lte: + oneOf: + - type: string + - type: number + gt: + oneOf: + - type: string + - type: number + gte: + oneOf: + - type: string + - type: number + not: + oneOf: + - oneOf: + - type: string + - type: number + - $ref: "#/components/schemas/NestedDecimalWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedDecimalFilter" + _sum: + $ref: "#/components/schemas/NestedDecimalFilter" + _min: + $ref: "#/components/schemas/NestedDecimalFilter" + _max: + $ref: "#/components/schemas/NestedDecimalFilter" + NestedBoolWithAggregatesFilter: + type: object + properties: + equals: + type: boolean + not: + oneOf: + - type: boolean + - $ref: "#/components/schemas/NestedBoolWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedBoolFilter" + _max: + $ref: "#/components/schemas/NestedBoolFilter" + NestedBytesNullableWithAggregatesFilter: + type: object + properties: + equals: + type: string + format: byte + nullable: true + in: + type: array + items: + type: string + format: byte + nullable: true + notIn: + type: array + items: + type: string + format: byte + nullable: true + not: + oneOf: + - type: string + format: byte + - $ref: "#/components/schemas/NestedBytesNullableWithAggregatesFilter" + nullable: true + _count: + $ref: "#/components/schemas/NestedIntNullableFilter" + _min: + $ref: "#/components/schemas/NestedBytesNullableFilter" + _max: + $ref: "#/components/schemas/NestedBytesNullableFilter" + NestedIntNullableFilter: + type: object + properties: + equals: + type: integer + nullable: true + in: + type: array + items: + type: integer + nullable: true + notIn: + type: array + items: + type: integer + nullable: true + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedIntNullableFilter" + nullable: true + NestedJsonNullableFilter: + type: object + properties: + equals: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + path: + type: array + items: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + string_contains: + type: string + string_starts_with: + type: string + string_ends_with: + type: string + array_starts_with: + nullable: true + array_ends_with: + nullable: true + array_contains: + nullable: true + lt: {} + lte: {} + gt: {} + gte: {} + not: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + NestedJsonFilter: + type: object + properties: + equals: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + path: + type: array + items: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + string_contains: + type: string + string_starts_with: + type: string + string_ends_with: + type: string + array_starts_with: + nullable: true + array_ends_with: + nullable: true + array_contains: + nullable: true + lt: {} + lte: {} + gt: {} + gte: {} + not: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + FooSelect: + type: object + properties: + id: + type: boolean + string: + type: boolean + int: + type: boolean + bigInt: + type: boolean + date: + type: boolean + float: + type: boolean + decimal: + type: boolean + boolean: + type: boolean + bytes: + type: boolean + json: + type: boolean + plainJson: + type: boolean + FooCountAggregateInput: + type: object + properties: + id: + type: boolean + string: + type: boolean + int: + type: boolean + bigInt: + type: boolean + date: + type: boolean + float: + type: boolean + decimal: + type: boolean + boolean: + type: boolean + bytes: + type: boolean + json: + type: boolean + plainJson: + type: boolean + _all: + type: boolean + FooAvgAggregateInput: + type: object + properties: + int: + type: boolean + bigInt: + type: boolean + float: + type: boolean + decimal: + type: boolean + FooSumAggregateInput: + type: object + properties: + int: + type: boolean + bigInt: + type: boolean + float: + type: boolean + decimal: + type: boolean + FooMinAggregateInput: + type: object + properties: + id: + type: boolean + string: + type: boolean + int: + type: boolean + bigInt: + type: boolean + date: + type: boolean + float: + type: boolean + decimal: + type: boolean + boolean: + type: boolean + bytes: + type: boolean + FooMaxAggregateInput: + type: object + properties: + id: + type: boolean + string: + type: boolean + int: + type: boolean + bigInt: + type: boolean + date: + type: boolean + float: + type: boolean + decimal: + type: boolean + boolean: + type: boolean + bytes: + type: boolean + AggregateFoo: + type: object + properties: + _count: + allOf: + - $ref: "#/components/schemas/FooCountAggregateOutputType" + nullable: true + _avg: + allOf: + - $ref: "#/components/schemas/FooAvgAggregateOutputType" + nullable: true + _sum: + allOf: + - $ref: "#/components/schemas/FooSumAggregateOutputType" + nullable: true + _min: + allOf: + - $ref: "#/components/schemas/FooMinAggregateOutputType" + nullable: true + _max: + allOf: + - $ref: "#/components/schemas/FooMaxAggregateOutputType" + nullable: true + FooGroupByOutputType: + type: object + properties: + id: + type: string + string: + type: string + int: + type: integer + bigInt: + type: integer + date: + type: string + format: date-time + float: + type: number + decimal: + oneOf: + - type: string + - type: number + boolean: + type: boolean + bytes: + type: string + format: byte + nullable: true + json: + nullable: true + plainJson: {} + _count: + allOf: + - $ref: "#/components/schemas/FooCountAggregateOutputType" + nullable: true + _avg: + allOf: + - $ref: "#/components/schemas/FooAvgAggregateOutputType" + nullable: true + _sum: + allOf: + - $ref: "#/components/schemas/FooSumAggregateOutputType" + nullable: true + _min: + allOf: + - $ref: "#/components/schemas/FooMinAggregateOutputType" + nullable: true + _max: + allOf: + - $ref: "#/components/schemas/FooMaxAggregateOutputType" + nullable: true + required: + - id + - string + - int + - bigInt + - date + - float + - decimal + - boolean + - plainJson + FooCountAggregateOutputType: + type: object + properties: + id: + type: integer + string: + type: integer + int: + type: integer + bigInt: + type: integer + date: + type: integer + float: + type: integer + decimal: + type: integer + boolean: + type: integer + bytes: + type: integer + json: + type: integer + plainJson: + type: integer + _all: + type: integer + required: + - id + - string + - int + - bigInt + - date + - float + - decimal + - boolean + - bytes + - json + - plainJson + - _all + FooAvgAggregateOutputType: + type: object + properties: + int: + type: number + nullable: true + bigInt: + type: number + nullable: true + float: + type: number + nullable: true + decimal: + oneOf: + - type: string + - type: number + nullable: true + FooSumAggregateOutputType: + type: object + properties: + int: + type: integer + nullable: true + bigInt: + type: integer + nullable: true + float: + type: number + nullable: true + decimal: + oneOf: + - type: string + - type: number + nullable: true + FooMinAggregateOutputType: + type: object + properties: + id: + type: string + nullable: true + string: + type: string + nullable: true + int: + type: integer + nullable: true + bigInt: + type: integer + nullable: true + date: + type: string + format: date-time + nullable: true + float: + type: number + nullable: true + decimal: + oneOf: + - type: string + - type: number + nullable: true + boolean: + type: boolean + nullable: true + bytes: + type: string + format: byte + nullable: true + FooMaxAggregateOutputType: + type: object + properties: + id: + type: string + nullable: true + string: + type: string + nullable: true + int: + type: integer + nullable: true + bigInt: + type: integer + nullable: true + date: + type: string + format: date-time + nullable: true + float: + type: number + nullable: true + decimal: + oneOf: + - type: string + - type: number + nullable: true + boolean: + type: boolean + nullable: true + bytes: + type: string + format: byte + nullable: true + _Meta: + type: object + description: Meta information about the request or response + properties: + serialization: + description: Serialization metadata + additionalProperties: true + _Error: + type: object + required: + - error + properties: + error: + type: object + required: + - message + properties: + prisma: + type: boolean + description: Indicates if the error occurred during a Prisma call + rejectedByPolicy: + type: boolean + description: Indicates if the error was due to rejection by a policy + code: + type: string + description: Prisma error code. Only available when "prisma" field is true. + message: + type: string + description: Error message + reason: + type: string + description: Detailed error reason + zodErrors: + type: object + additionalProperties: true + description: Zod validation errors if the error is due to data validation + failure + additionalProperties: true + BatchPayload: + type: object + properties: + count: + type: integer + FooCreateArgs: + type: object + required: + - data + properties: + select: + $ref: "#/components/schemas/FooSelect" + data: + $ref: "#/components/schemas/FooCreateInput" + meta: + $ref: "#/components/schemas/_Meta" + FooCreateManyArgs: + type: object + required: + - data + properties: + data: + oneOf: + - $ref: "#/components/schemas/FooCreateManyInput" + - type: array + items: + $ref: "#/components/schemas/FooCreateManyInput" + skipDuplicates: + type: boolean + description: Do not insert records with unique fields or ID fields that already + exist. + meta: + $ref: "#/components/schemas/_Meta" + FooFindUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: "#/components/schemas/FooSelect" + where: + $ref: "#/components/schemas/FooWhereUniqueInput" + meta: + $ref: "#/components/schemas/_Meta" + FooFindFirstArgs: + type: object + properties: + select: + $ref: "#/components/schemas/FooSelect" + where: + $ref: "#/components/schemas/FooWhereInput" + meta: + $ref: "#/components/schemas/_Meta" + FooFindManyArgs: + type: object + properties: + select: + $ref: "#/components/schemas/FooSelect" + where: + $ref: "#/components/schemas/FooWhereInput" + meta: + $ref: "#/components/schemas/_Meta" + FooUpdateArgs: + type: object + required: + - where + - data + properties: + select: + $ref: "#/components/schemas/FooSelect" + where: + $ref: "#/components/schemas/FooWhereUniqueInput" + data: + $ref: "#/components/schemas/FooUpdateInput" + meta: + $ref: "#/components/schemas/_Meta" + FooUpdateManyArgs: + type: object + required: + - data + properties: + where: + $ref: "#/components/schemas/FooWhereInput" + data: + $ref: "#/components/schemas/FooUpdateManyMutationInput" + meta: + $ref: "#/components/schemas/_Meta" + FooUpsertArgs: + type: object + required: + - create + - update + - where + properties: + select: + $ref: "#/components/schemas/FooSelect" + where: + $ref: "#/components/schemas/FooWhereUniqueInput" + create: + $ref: "#/components/schemas/FooCreateInput" + update: + $ref: "#/components/schemas/FooUpdateInput" + meta: + $ref: "#/components/schemas/_Meta" + FooDeleteUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: "#/components/schemas/FooSelect" + where: + $ref: "#/components/schemas/FooWhereUniqueInput" + meta: + $ref: "#/components/schemas/_Meta" + FooDeleteManyArgs: + type: object + properties: + where: + $ref: "#/components/schemas/FooWhereInput" + meta: + $ref: "#/components/schemas/_Meta" + FooCountArgs: + type: object + properties: + select: + $ref: "#/components/schemas/FooSelect" + where: + $ref: "#/components/schemas/FooWhereInput" + meta: + $ref: "#/components/schemas/_Meta" + FooAggregateArgs: + type: object + properties: + where: + $ref: "#/components/schemas/FooWhereInput" + orderBy: + $ref: "#/components/schemas/FooOrderByWithRelationInput" + cursor: + $ref: "#/components/schemas/FooWhereUniqueInput" + take: + type: integer + skip: + type: integer + _count: + oneOf: + - type: boolean + - $ref: "#/components/schemas/FooCountAggregateInput" + _min: + $ref: "#/components/schemas/FooMinAggregateInput" + _max: + $ref: "#/components/schemas/FooMaxAggregateInput" + _sum: + $ref: "#/components/schemas/FooSumAggregateInput" + _avg: + $ref: "#/components/schemas/FooAvgAggregateInput" + meta: + $ref: "#/components/schemas/_Meta" + FooGroupByArgs: + type: object + properties: + where: + $ref: "#/components/schemas/FooWhereInput" + orderBy: + $ref: "#/components/schemas/FooOrderByWithRelationInput" + by: + $ref: "#/components/schemas/FooScalarFieldEnum" + having: + $ref: "#/components/schemas/FooScalarWhereWithAggregatesInput" + take: + type: integer + skip: + type: integer + _count: + oneOf: + - type: boolean + - $ref: "#/components/schemas/FooCountAggregateInput" + _min: + $ref: "#/components/schemas/FooMinAggregateInput" + _max: + $ref: "#/components/schemas/FooMaxAggregateInput" + _sum: + $ref: "#/components/schemas/FooSumAggregateInput" + _avg: + $ref: "#/components/schemas/FooAvgAggregateInput" + meta: + $ref: "#/components/schemas/_Meta" +paths: + /foo/create: + post: + operationId: createFoo + description: Create a new Foo + tags: + - foo + security: [] + responses: + "201": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/Foo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FooCreateArgs" + /foo/createMany: + post: + operationId: createManyFoo + description: Create several Foo + tags: + - foo + security: [] + responses: + "201": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/BatchPayload" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FooCreateManyArgs" + /foo/findUnique: + get: + operationId: findUniqueFoo + description: Find one unique Foo + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/Foo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooFindUniqueArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /foo/findFirst: + get: + operationId: findFirstFoo + description: Find the first Foo matching the given condition + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/Foo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooFindFirstArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /foo/findMany: + get: + operationId: findManyFoo + description: Find a list of Foo + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: type: array items: - type: integer - nullable: true - notIn: + $ref: "#/components/schemas/Foo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooFindManyArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /foo/update: + patch: + operationId: updateFoo + description: Update a Foo + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/Foo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FooUpdateArgs" + /foo/updateMany: + patch: + operationId: updateManyFoo + description: Update Foos matching the given condition + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/BatchPayload" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FooUpdateManyArgs" + /foo/upsert: + post: + operationId: upsertFoo + description: Upsert a Foo + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/Foo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FooUpsertArgs" + /foo/delete: + delete: + operationId: deleteFoo + description: Delete one unique Foo + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/Foo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooDeleteUniqueArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /foo/deleteMany: + delete: + operationId: deleteManyFoo + description: Delete Foos matching the given condition + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/BatchPayload" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooDeleteManyArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /foo/count: + get: + operationId: countFoo + description: Find a list of Foo + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + oneOf: + - type: integer + - $ref: "#/components/schemas/FooCountAggregateOutputType" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooCountArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /foo/aggregate: + get: + operationId: aggregateFoo + description: Aggregate Foos + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/AggregateFoo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooAggregateArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /foo/groupBy: + get: + operationId: groupByFoo + description: Group Foos by fields + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: type: array items: - type: integer - nullable: true - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedIntNullableFilter' - nullable: true - FooSelect: - type: object - properties: - id: - type: boolean - string: - type: boolean - int: - type: boolean - bigInt: - type: boolean - date: - type: boolean - float: - type: boolean - decimal: - type: boolean - boolean: - type: boolean - bytes: - type: boolean - FooCountAggregateInput: - type: object - properties: - id: - type: boolean - string: - type: boolean - int: - type: boolean - bigInt: - type: boolean - date: - type: boolean - float: - type: boolean - decimal: - type: boolean - boolean: - type: boolean - bytes: - type: boolean - _all: - type: boolean - FooAvgAggregateInput: - type: object - properties: - int: - type: boolean - bigInt: - type: boolean - float: - type: boolean - decimal: - type: boolean - FooSumAggregateInput: - type: object - properties: - int: - type: boolean - bigInt: - type: boolean - float: - type: boolean - decimal: - type: boolean - FooMinAggregateInput: - type: object - properties: - id: - type: boolean - string: - type: boolean - int: - type: boolean - bigInt: - type: boolean - date: - type: boolean - float: - type: boolean - decimal: - type: boolean - boolean: - type: boolean - bytes: - type: boolean - FooMaxAggregateInput: - type: object - properties: - id: - type: boolean - string: - type: boolean - int: - type: boolean - bigInt: - type: boolean - date: - type: boolean - float: - type: boolean - decimal: - type: boolean - boolean: - type: boolean - bytes: - type: boolean - AggregateFoo: - type: object - properties: - _count: - allOf: - - $ref: '#/components/schemas/FooCountAggregateOutputType' - nullable: true - _avg: - allOf: - - $ref: '#/components/schemas/FooAvgAggregateOutputType' - nullable: true - _sum: - allOf: - - $ref: '#/components/schemas/FooSumAggregateOutputType' - nullable: true - _min: - allOf: - - $ref: '#/components/schemas/FooMinAggregateOutputType' - nullable: true - _max: - allOf: - - $ref: '#/components/schemas/FooMaxAggregateOutputType' - nullable: true - FooGroupByOutputType: - type: object - properties: - id: - type: string - string: - type: string - int: - type: integer - bigInt: - type: integer - date: - type: string - format: date-time - float: - type: number - decimal: - oneOf: - - type: string - - type: number - boolean: - type: boolean - bytes: - type: string - format: byte - nullable: true - _count: - allOf: - - $ref: '#/components/schemas/FooCountAggregateOutputType' - nullable: true - _avg: - allOf: - - $ref: '#/components/schemas/FooAvgAggregateOutputType' - nullable: true - _sum: - allOf: - - $ref: '#/components/schemas/FooSumAggregateOutputType' - nullable: true - _min: - allOf: - - $ref: '#/components/schemas/FooMinAggregateOutputType' - nullable: true - _max: - allOf: - - $ref: '#/components/schemas/FooMaxAggregateOutputType' - nullable: true - required: - - id - - string - - int - - bigInt - - date - - float - - decimal - - boolean - FooCountAggregateOutputType: - type: object - properties: - id: - type: integer - string: - type: integer - int: - type: integer - bigInt: - type: integer - date: - type: integer - float: - type: integer - decimal: - type: integer - boolean: - type: integer - bytes: - type: integer - _all: - type: integer - required: - - id - - string - - int - - bigInt - - date - - float - - decimal - - boolean - - bytes - - _all - FooAvgAggregateOutputType: - type: object - properties: - int: - type: number - nullable: true - bigInt: - type: number - nullable: true - float: - type: number - nullable: true - decimal: - oneOf: - - type: string - - type: number - nullable: true - FooSumAggregateOutputType: - type: object - properties: - int: - type: integer - nullable: true - bigInt: - type: integer - nullable: true - float: - type: number - nullable: true - decimal: - oneOf: - - type: string - - type: number - nullable: true - FooMinAggregateOutputType: - type: object - properties: - id: - type: string - nullable: true - string: - type: string - nullable: true - int: - type: integer - nullable: true - bigInt: - type: integer - nullable: true - date: - type: string - format: date-time - nullable: true - float: - type: number - nullable: true - decimal: - oneOf: - - type: string - - type: number - nullable: true - boolean: - type: boolean - nullable: true - bytes: - type: string - format: byte - nullable: true - FooMaxAggregateOutputType: - type: object - properties: - id: - type: string - nullable: true - string: - type: string - nullable: true - int: - type: integer - nullable: true - bigInt: - type: integer - nullable: true - date: - type: string - format: date-time - nullable: true - float: - type: number - nullable: true - decimal: - oneOf: - - type: string - - type: number - nullable: true - boolean: - type: boolean - nullable: true - bytes: - type: string - format: byte - nullable: true - _Meta: - type: object - description: Meta information about the request or response - properties: - serialization: - description: Serialization metadata - additionalProperties: true - _Error: - type: object - required: - - error - properties: - error: - type: object - required: - - message - properties: - prisma: - type: boolean - description: Indicates if the error occurred during a Prisma call - rejectedByPolicy: - type: boolean - description: Indicates if the error was due to rejection by a policy - code: - type: string - description: Prisma error code. Only available when "prisma" field is true. - message: - type: string - description: Error message - reason: - type: string - description: Detailed error reason - zodErrors: - type: object - additionalProperties: true - description: Zod validation errors if the error is due to data validation - failure - additionalProperties: true - BatchPayload: - type: object - properties: - count: - type: integer - FooCreateArgs: - type: object - required: - - data - properties: - select: - $ref: '#/components/schemas/FooSelect' - data: - $ref: '#/components/schemas/FooCreateInput' - meta: - $ref: '#/components/schemas/_Meta' - FooCreateManyArgs: - type: object - required: - - data - properties: - data: - oneOf: - - $ref: '#/components/schemas/FooCreateManyInput' - - type: array - items: - $ref: '#/components/schemas/FooCreateManyInput' - skipDuplicates: - type: boolean - description: Do not insert records with unique fields or ID fields that already - exist. - meta: - $ref: '#/components/schemas/_Meta' - FooFindUniqueArgs: - type: object - required: - - where - properties: - select: - $ref: '#/components/schemas/FooSelect' - where: - $ref: '#/components/schemas/FooWhereUniqueInput' - meta: - $ref: '#/components/schemas/_Meta' - FooFindFirstArgs: - type: object - properties: - select: - $ref: '#/components/schemas/FooSelect' - where: - $ref: '#/components/schemas/FooWhereInput' - meta: - $ref: '#/components/schemas/_Meta' - FooFindManyArgs: - type: object - properties: - select: - $ref: '#/components/schemas/FooSelect' - where: - $ref: '#/components/schemas/FooWhereInput' - meta: - $ref: '#/components/schemas/_Meta' - FooUpdateArgs: - type: object - required: - - where - - data - properties: - select: - $ref: '#/components/schemas/FooSelect' - where: - $ref: '#/components/schemas/FooWhereUniqueInput' - data: - $ref: '#/components/schemas/FooUpdateInput' - meta: - $ref: '#/components/schemas/_Meta' - FooUpdateManyArgs: - type: object - required: - - data - properties: - where: - $ref: '#/components/schemas/FooWhereInput' - data: - $ref: '#/components/schemas/FooUpdateManyMutationInput' - meta: - $ref: '#/components/schemas/_Meta' - FooUpsertArgs: - type: object - required: - - create - - update - - where - properties: - select: - $ref: '#/components/schemas/FooSelect' - where: - $ref: '#/components/schemas/FooWhereUniqueInput' - create: - $ref: '#/components/schemas/FooCreateInput' - update: - $ref: '#/components/schemas/FooUpdateInput' - meta: - $ref: '#/components/schemas/_Meta' - FooDeleteUniqueArgs: - type: object - required: - - where - properties: - select: - $ref: '#/components/schemas/FooSelect' - where: - $ref: '#/components/schemas/FooWhereUniqueInput' - meta: - $ref: '#/components/schemas/_Meta' - FooDeleteManyArgs: - type: object - properties: - where: - $ref: '#/components/schemas/FooWhereInput' - meta: - $ref: '#/components/schemas/_Meta' - FooCountArgs: - type: object - properties: - select: - $ref: '#/components/schemas/FooSelect' - where: - $ref: '#/components/schemas/FooWhereInput' - meta: - $ref: '#/components/schemas/_Meta' - FooAggregateArgs: - type: object - properties: - where: - $ref: '#/components/schemas/FooWhereInput' - orderBy: - $ref: '#/components/schemas/FooOrderByWithRelationInput' - cursor: - $ref: '#/components/schemas/FooWhereUniqueInput' - take: - type: integer - skip: - type: integer - _count: - oneOf: - - type: boolean - - $ref: '#/components/schemas/FooCountAggregateInput' - _min: - $ref: '#/components/schemas/FooMinAggregateInput' - _max: - $ref: '#/components/schemas/FooMaxAggregateInput' - _sum: - $ref: '#/components/schemas/FooSumAggregateInput' - _avg: - $ref: '#/components/schemas/FooAvgAggregateInput' - meta: - $ref: '#/components/schemas/_Meta' - FooGroupByArgs: - type: object - properties: - where: - $ref: '#/components/schemas/FooWhereInput' - orderBy: - $ref: '#/components/schemas/FooOrderByWithRelationInput' - by: - $ref: '#/components/schemas/FooScalarFieldEnum' - having: - $ref: '#/components/schemas/FooScalarWhereWithAggregatesInput' - take: - type: integer - skip: - type: integer - _count: - oneOf: - - type: boolean - - $ref: '#/components/schemas/FooCountAggregateInput' - _min: - $ref: '#/components/schemas/FooMinAggregateInput' - _max: - $ref: '#/components/schemas/FooMaxAggregateInput' - _sum: - $ref: '#/components/schemas/FooSumAggregateInput' - _avg: - $ref: '#/components/schemas/FooAvgAggregateInput' - meta: - $ref: '#/components/schemas/_Meta' -paths: - /foo/create: - post: - operationId: createFoo - description: Create a new Foo - tags: - - foo - security: [] - responses: - '201': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/Foo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FooCreateArgs' - /foo/createMany: - post: - operationId: createManyFoo - description: Create several Foo - tags: - - foo - security: [] - responses: - '201': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/BatchPayload' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FooCreateManyArgs' - /foo/findUnique: - get: - operationId: findUniqueFoo - description: Find one unique Foo - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/Foo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooFindUniqueArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} - /foo/findFirst: - get: - operationId: findFirstFoo - description: Find the first Foo matching the given condition - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/Foo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooFindFirstArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} - /foo/findMany: - get: - operationId: findManyFoo - description: Find a list of Foo - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/Foo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooFindManyArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} - /foo/update: - patch: - operationId: updateFoo - description: Update a Foo - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/Foo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FooUpdateArgs' - /foo/updateMany: - patch: - operationId: updateManyFoo - description: Update Foos matching the given condition - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/BatchPayload' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FooUpdateManyArgs' - /foo/upsert: - post: - operationId: upsertFoo - description: Upsert a Foo - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/Foo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FooUpsertArgs' - /foo/delete: - delete: - operationId: deleteFoo - description: Delete one unique Foo - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/Foo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooDeleteUniqueArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} - /foo/deleteMany: - delete: - operationId: deleteManyFoo - description: Delete Foos matching the given condition - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/BatchPayload' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooDeleteManyArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} - /foo/count: - get: - operationId: countFoo - description: Find a list of Foo - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - oneOf: - - type: integer - - $ref: '#/components/schemas/FooCountAggregateOutputType' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooCountArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} - /foo/aggregate: - get: - operationId: aggregateFoo - description: Aggregate Foos - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/AggregateFoo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooAggregateArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} - /foo/groupBy: - get: - operationId: groupByFoo - description: Group Foos by fields - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/FooGroupByOutputType' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooGroupByArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} + $ref: "#/components/schemas/FooGroupByOutputType" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooGroupByArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} diff --git a/packages/plugins/openapi/tests/baseline/rpc-type-coverage-3.1.0.baseline.yaml b/packages/plugins/openapi/tests/baseline/rpc-type-coverage-3.1.0.baseline.yaml index 3ada4651d..fc63a6d16 100644 --- a/packages/plugins/openapi/tests/baseline/rpc-type-coverage-3.1.0.baseline.yaml +++ b/packages/plugins/openapi/tests/baseline/rpc-type-coverage-3.1.0.baseline.yaml @@ -1,2813 +1,3162 @@ openapi: 3.1.0 info: - title: ZenStack Generated API - version: 1.0.0 + title: ZenStack Generated API + version: 1.0.0 tags: - - name: foo - description: Foo operations + - name: foo + description: Foo operations components: - schemas: - FooScalarFieldEnum: + schemas: + FooScalarFieldEnum: + type: string + enum: + - id + - string + - int + - bigInt + - date + - float + - decimal + - boolean + - bytes + - json + - plainJson + SortOrder: + type: string + enum: + - asc + - desc + NullableJsonNullValueInput: + type: string + enum: + - DbNull + - JsonNull + JsonNullValueInput: + type: string + enum: + - JsonNull + QueryMode: + type: string + enum: + - default + - insensitive + JsonNullValueFilter: + type: string + enum: + - DbNull + - JsonNull + - AnyNull + NullsOrder: + type: string + enum: + - first + - last + Foo: + type: object + properties: + id: + type: string + string: + type: string + int: + type: integer + bigInt: + type: integer + date: + type: string + format: date-time + float: + type: number + decimal: + oneOf: + - type: string + - type: number + boolean: + type: boolean + bytes: + oneOf: + - type: "null" + - type: string + format: byte + json: + oneOf: + - type: "null" + - $ref: "#/components/schemas/Meta" + plainJson: {} + required: + - id + - string + - int + - bigInt + - date + - float + - decimal + - boolean + - plainJson + Meta: + type: object + description: The "Meta" TypeDef + properties: + something: + type: string + required: + - something + FooWhereInput: + type: object + properties: + AND: + oneOf: + - $ref: "#/components/schemas/FooWhereInput" + - type: array + items: + $ref: "#/components/schemas/FooWhereInput" + OR: + type: array + items: + $ref: "#/components/schemas/FooWhereInput" + NOT: + oneOf: + - $ref: "#/components/schemas/FooWhereInput" + - type: array + items: + $ref: "#/components/schemas/FooWhereInput" + id: + oneOf: + - $ref: "#/components/schemas/StringFilter" + - type: string + string: + oneOf: + - $ref: "#/components/schemas/StringFilter" + - type: string + int: + oneOf: + - $ref: "#/components/schemas/IntFilter" + - type: integer + bigInt: + oneOf: + - $ref: "#/components/schemas/BigIntFilter" + - type: integer + date: + oneOf: + - $ref: "#/components/schemas/DateTimeFilter" + - type: string + format: date-time + float: + oneOf: + - $ref: "#/components/schemas/FloatFilter" + - type: number + decimal: + oneOf: + - $ref: "#/components/schemas/DecimalFilter" + - oneOf: + - type: string + - type: number + boolean: + oneOf: + - $ref: "#/components/schemas/BoolFilter" + - type: boolean + bytes: + oneOf: + - $ref: "#/components/schemas/BytesNullableFilter" + - type: string + format: byte + - type: "null" + json: + $ref: "#/components/schemas/JsonNullableFilter" + plainJson: + $ref: "#/components/schemas/JsonFilter" + FooOrderByWithRelationInput: + type: object + properties: + id: + $ref: "#/components/schemas/SortOrder" + string: + $ref: "#/components/schemas/SortOrder" + int: + $ref: "#/components/schemas/SortOrder" + bigInt: + $ref: "#/components/schemas/SortOrder" + date: + $ref: "#/components/schemas/SortOrder" + float: + $ref: "#/components/schemas/SortOrder" + decimal: + $ref: "#/components/schemas/SortOrder" + boolean: + $ref: "#/components/schemas/SortOrder" + bytes: + oneOf: + - $ref: "#/components/schemas/SortOrder" + - $ref: "#/components/schemas/SortOrderInput" + json: + oneOf: + - $ref: "#/components/schemas/SortOrder" + - $ref: "#/components/schemas/SortOrderInput" + plainJson: + $ref: "#/components/schemas/SortOrder" + FooWhereUniqueInput: + type: object + properties: + id: + type: string + AND: + oneOf: + - $ref: "#/components/schemas/FooWhereInput" + - type: array + items: + $ref: "#/components/schemas/FooWhereInput" + OR: + type: array + items: + $ref: "#/components/schemas/FooWhereInput" + NOT: + oneOf: + - $ref: "#/components/schemas/FooWhereInput" + - type: array + items: + $ref: "#/components/schemas/FooWhereInput" + string: + oneOf: + - $ref: "#/components/schemas/StringFilter" + - type: string + int: + oneOf: + - $ref: "#/components/schemas/IntFilter" + - type: integer + bigInt: + oneOf: + - $ref: "#/components/schemas/BigIntFilter" + - type: integer + date: + oneOf: + - $ref: "#/components/schemas/DateTimeFilter" + - type: string + format: date-time + float: + oneOf: + - $ref: "#/components/schemas/FloatFilter" + - type: number + decimal: + oneOf: + - $ref: "#/components/schemas/DecimalFilter" + - oneOf: + - type: string + - type: number + boolean: + oneOf: + - $ref: "#/components/schemas/BoolFilter" + - type: boolean + bytes: + oneOf: + - $ref: "#/components/schemas/BytesNullableFilter" + - type: string + format: byte + - type: "null" + json: + $ref: "#/components/schemas/JsonNullableFilter" + plainJson: + $ref: "#/components/schemas/JsonFilter" + FooScalarWhereWithAggregatesInput: + type: object + properties: + AND: + oneOf: + - $ref: "#/components/schemas/FooScalarWhereWithAggregatesInput" + - type: array + items: + $ref: "#/components/schemas/FooScalarWhereWithAggregatesInput" + OR: + type: array + items: + $ref: "#/components/schemas/FooScalarWhereWithAggregatesInput" + NOT: + oneOf: + - $ref: "#/components/schemas/FooScalarWhereWithAggregatesInput" + - type: array + items: + $ref: "#/components/schemas/FooScalarWhereWithAggregatesInput" + id: + oneOf: + - $ref: "#/components/schemas/StringWithAggregatesFilter" + - type: string + string: + oneOf: + - $ref: "#/components/schemas/StringWithAggregatesFilter" + - type: string + int: + oneOf: + - $ref: "#/components/schemas/IntWithAggregatesFilter" + - type: integer + bigInt: + oneOf: + - $ref: "#/components/schemas/BigIntWithAggregatesFilter" + - type: integer + date: + oneOf: + - $ref: "#/components/schemas/DateTimeWithAggregatesFilter" + - type: string + format: date-time + float: + oneOf: + - $ref: "#/components/schemas/FloatWithAggregatesFilter" + - type: number + decimal: + oneOf: + - $ref: "#/components/schemas/DecimalWithAggregatesFilter" + - oneOf: + - type: string + - type: number + boolean: + oneOf: + - $ref: "#/components/schemas/BoolWithAggregatesFilter" + - type: boolean + bytes: + oneOf: + - $ref: "#/components/schemas/BytesNullableWithAggregatesFilter" + - type: string + format: byte + - type: "null" + json: + $ref: "#/components/schemas/JsonNullableWithAggregatesFilter" + plainJson: + $ref: "#/components/schemas/JsonWithAggregatesFilter" + FooCreateInput: + type: object + properties: + id: + type: string + string: + type: string + int: + type: integer + bigInt: + type: integer + date: + type: string + format: date-time + float: + type: number + decimal: + oneOf: + - type: string + - type: number + boolean: + type: boolean + bytes: + oneOf: + - type: "null" + - type: string + format: byte + json: + oneOf: + - $ref: "#/components/schemas/NullableJsonNullValueInput" + - {} + plainJson: + oneOf: + - $ref: "#/components/schemas/JsonNullValueInput" + - {} + required: + - string + - int + - bigInt + - date + - float + - decimal + - boolean + - plainJson + FooUpdateInput: + type: object + properties: + id: + oneOf: + - type: string + - $ref: "#/components/schemas/StringFieldUpdateOperationsInput" + string: + oneOf: + - type: string + - $ref: "#/components/schemas/StringFieldUpdateOperationsInput" + int: + oneOf: + - type: integer + - $ref: "#/components/schemas/IntFieldUpdateOperationsInput" + bigInt: + oneOf: + - type: integer + - $ref: "#/components/schemas/BigIntFieldUpdateOperationsInput" + date: + oneOf: + - type: string + format: date-time + - $ref: "#/components/schemas/DateTimeFieldUpdateOperationsInput" + float: + oneOf: + - type: number + - $ref: "#/components/schemas/FloatFieldUpdateOperationsInput" + decimal: + oneOf: + - oneOf: + - type: string + - type: number + - $ref: "#/components/schemas/DecimalFieldUpdateOperationsInput" + boolean: + oneOf: + - type: boolean + - $ref: "#/components/schemas/BoolFieldUpdateOperationsInput" + bytes: + oneOf: + - type: string + format: byte + - $ref: "#/components/schemas/NullableBytesFieldUpdateOperationsInput" + - type: "null" + json: + oneOf: + - $ref: "#/components/schemas/NullableJsonNullValueInput" + - {} + plainJson: + oneOf: + - $ref: "#/components/schemas/JsonNullValueInput" + - {} + FooCreateManyInput: + type: object + properties: + id: + type: string + string: + type: string + int: + type: integer + bigInt: + type: integer + date: + type: string + format: date-time + float: + type: number + decimal: + oneOf: + - type: string + - type: number + boolean: + type: boolean + bytes: + oneOf: + - type: "null" + - type: string + format: byte + json: + oneOf: + - $ref: "#/components/schemas/NullableJsonNullValueInput" + - {} + plainJson: + oneOf: + - $ref: "#/components/schemas/JsonNullValueInput" + - {} + required: + - string + - int + - bigInt + - date + - float + - decimal + - boolean + - plainJson + FooUpdateManyMutationInput: + type: object + properties: + id: + oneOf: + - type: string + - $ref: "#/components/schemas/StringFieldUpdateOperationsInput" + string: + oneOf: + - type: string + - $ref: "#/components/schemas/StringFieldUpdateOperationsInput" + int: + oneOf: + - type: integer + - $ref: "#/components/schemas/IntFieldUpdateOperationsInput" + bigInt: + oneOf: + - type: integer + - $ref: "#/components/schemas/BigIntFieldUpdateOperationsInput" + date: + oneOf: + - type: string + format: date-time + - $ref: "#/components/schemas/DateTimeFieldUpdateOperationsInput" + float: + oneOf: + - type: number + - $ref: "#/components/schemas/FloatFieldUpdateOperationsInput" + decimal: + oneOf: + - oneOf: + - type: string + - type: number + - $ref: "#/components/schemas/DecimalFieldUpdateOperationsInput" + boolean: + oneOf: + - type: boolean + - $ref: "#/components/schemas/BoolFieldUpdateOperationsInput" + bytes: + oneOf: + - type: string + format: byte + - $ref: "#/components/schemas/NullableBytesFieldUpdateOperationsInput" + - type: "null" + json: + oneOf: + - $ref: "#/components/schemas/NullableJsonNullValueInput" + - {} + plainJson: + oneOf: + - $ref: "#/components/schemas/JsonNullValueInput" + - {} + StringFilter: + type: object + properties: + equals: + type: string + in: + type: array + items: type: string - enum: - - id - - string - - int - - bigInt - - date - - float - - decimal - - boolean - - bytes - SortOrder: + notIn: + type: array + items: type: string - enum: - - asc - - desc - QueryMode: + lt: + type: string + lte: + type: string + gt: + type: string + gte: + type: string + contains: + type: string + startsWith: + type: string + endsWith: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + not: + oneOf: + - type: string + - $ref: "#/components/schemas/NestedStringFilter" + IntFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedIntFilter" + BigIntFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedBigIntFilter" + DateTimeFilter: + type: object + properties: + equals: + type: string + format: date-time + in: + type: array + items: type: string - enum: - - default - - insensitive - NullsOrder: + format: date-time + notIn: + type: array + items: type: string - enum: - - first - - last - Foo: - type: object - properties: - id: - type: string - string: - type: string - int: - type: integer - bigInt: - type: integer - date: - type: string - format: date-time - float: - type: number - decimal: - oneOf: - - type: string - - type: number - boolean: - type: boolean - bytes: - oneOf: - - type: 'null' - - type: string - format: byte - required: - - id - - string - - int - - bigInt - - date - - float - - decimal - - boolean - FooWhereInput: - type: object - properties: - AND: - oneOf: - - $ref: '#/components/schemas/FooWhereInput' - - type: array - items: - $ref: '#/components/schemas/FooWhereInput' - OR: - type: array - items: - $ref: '#/components/schemas/FooWhereInput' - NOT: - oneOf: - - $ref: '#/components/schemas/FooWhereInput' - - type: array - items: - $ref: '#/components/schemas/FooWhereInput' - id: - oneOf: - - $ref: '#/components/schemas/StringFilter' - - type: string - string: - oneOf: - - $ref: '#/components/schemas/StringFilter' - - type: string - int: - oneOf: - - $ref: '#/components/schemas/IntFilter' - - type: integer - bigInt: - oneOf: - - $ref: '#/components/schemas/BigIntFilter' - - type: integer - date: - oneOf: - - $ref: '#/components/schemas/DateTimeFilter' - - type: string - format: date-time - float: - oneOf: - - $ref: '#/components/schemas/FloatFilter' - - type: number - decimal: - oneOf: - - $ref: '#/components/schemas/DecimalFilter' - - oneOf: - - type: string - - type: number - boolean: - oneOf: - - $ref: '#/components/schemas/BoolFilter' - - type: boolean - bytes: - oneOf: - - $ref: '#/components/schemas/BytesNullableFilter' - - type: string - format: byte - - type: 'null' - FooOrderByWithRelationInput: - type: object - properties: - id: - $ref: '#/components/schemas/SortOrder' - string: - $ref: '#/components/schemas/SortOrder' - int: - $ref: '#/components/schemas/SortOrder' - bigInt: - $ref: '#/components/schemas/SortOrder' - date: - $ref: '#/components/schemas/SortOrder' - float: - $ref: '#/components/schemas/SortOrder' - decimal: - $ref: '#/components/schemas/SortOrder' - boolean: - $ref: '#/components/schemas/SortOrder' - bytes: - oneOf: - - $ref: '#/components/schemas/SortOrder' - - $ref: '#/components/schemas/SortOrderInput' - FooWhereUniqueInput: - type: object - properties: - id: - type: string - AND: - oneOf: - - $ref: '#/components/schemas/FooWhereInput' - - type: array - items: - $ref: '#/components/schemas/FooWhereInput' - OR: - type: array - items: - $ref: '#/components/schemas/FooWhereInput' - NOT: - oneOf: - - $ref: '#/components/schemas/FooWhereInput' - - type: array - items: - $ref: '#/components/schemas/FooWhereInput' - string: - oneOf: - - $ref: '#/components/schemas/StringFilter' - - type: string - int: - oneOf: - - $ref: '#/components/schemas/IntFilter' - - type: integer - bigInt: - oneOf: - - $ref: '#/components/schemas/BigIntFilter' - - type: integer - date: - oneOf: - - $ref: '#/components/schemas/DateTimeFilter' - - type: string - format: date-time - float: - oneOf: - - $ref: '#/components/schemas/FloatFilter' - - type: number - decimal: - oneOf: - - $ref: '#/components/schemas/DecimalFilter' - - oneOf: - - type: string - - type: number - boolean: - oneOf: - - $ref: '#/components/schemas/BoolFilter' - - type: boolean - bytes: - oneOf: - - $ref: '#/components/schemas/BytesNullableFilter' - - type: string - format: byte - - type: 'null' - FooScalarWhereWithAggregatesInput: - type: object - properties: - AND: - oneOf: - - $ref: '#/components/schemas/FooScalarWhereWithAggregatesInput' - - type: array - items: - $ref: '#/components/schemas/FooScalarWhereWithAggregatesInput' - OR: - type: array - items: - $ref: '#/components/schemas/FooScalarWhereWithAggregatesInput' - NOT: - oneOf: - - $ref: '#/components/schemas/FooScalarWhereWithAggregatesInput' - - type: array - items: - $ref: '#/components/schemas/FooScalarWhereWithAggregatesInput' - id: - oneOf: - - $ref: '#/components/schemas/StringWithAggregatesFilter' - - type: string - string: - oneOf: - - $ref: '#/components/schemas/StringWithAggregatesFilter' - - type: string - int: - oneOf: - - $ref: '#/components/schemas/IntWithAggregatesFilter' - - type: integer - bigInt: - oneOf: - - $ref: '#/components/schemas/BigIntWithAggregatesFilter' - - type: integer - date: - oneOf: - - $ref: '#/components/schemas/DateTimeWithAggregatesFilter' - - type: string - format: date-time - float: - oneOf: - - $ref: '#/components/schemas/FloatWithAggregatesFilter' - - type: number - decimal: - oneOf: - - $ref: '#/components/schemas/DecimalWithAggregatesFilter' - - oneOf: - - type: string - - type: number - boolean: - oneOf: - - $ref: '#/components/schemas/BoolWithAggregatesFilter' - - type: boolean - bytes: - oneOf: - - $ref: '#/components/schemas/BytesNullableWithAggregatesFilter' - - type: string - format: byte - - type: 'null' - FooCreateInput: - type: object - properties: - id: - type: string - string: - type: string - int: - type: integer - bigInt: - type: integer - date: - type: string - format: date-time - float: - type: number - decimal: - oneOf: - - type: string - - type: number - boolean: - type: boolean - bytes: - oneOf: - - type: 'null' - - type: string - format: byte - required: - - string - - int - - bigInt - - date - - float - - decimal - - boolean - FooUpdateInput: - type: object - properties: - id: - oneOf: - - type: string - - $ref: '#/components/schemas/StringFieldUpdateOperationsInput' - string: - oneOf: - - type: string - - $ref: '#/components/schemas/StringFieldUpdateOperationsInput' - int: - oneOf: - - type: integer - - $ref: '#/components/schemas/IntFieldUpdateOperationsInput' - bigInt: - oneOf: - - type: integer - - $ref: '#/components/schemas/BigIntFieldUpdateOperationsInput' - date: - oneOf: - - type: string - format: date-time - - $ref: '#/components/schemas/DateTimeFieldUpdateOperationsInput' - float: - oneOf: - - type: number - - $ref: '#/components/schemas/FloatFieldUpdateOperationsInput' - decimal: - oneOf: - - oneOf: - - type: string - - type: number - - $ref: '#/components/schemas/DecimalFieldUpdateOperationsInput' - boolean: - oneOf: - - type: boolean - - $ref: '#/components/schemas/BoolFieldUpdateOperationsInput' - bytes: - oneOf: - - type: string - format: byte - - $ref: '#/components/schemas/NullableBytesFieldUpdateOperationsInput' - - type: 'null' - FooCreateManyInput: - type: object - properties: - id: - type: string - string: - type: string - int: - type: integer - bigInt: - type: integer - date: - type: string - format: date-time - float: - type: number - decimal: - oneOf: - - type: string - - type: number - boolean: - type: boolean - bytes: - oneOf: - - type: 'null' - - type: string - format: byte - required: - - string - - int - - bigInt - - date - - float - - decimal - - boolean - FooUpdateManyMutationInput: - type: object - properties: - id: - oneOf: - - type: string - - $ref: '#/components/schemas/StringFieldUpdateOperationsInput' - string: - oneOf: - - type: string - - $ref: '#/components/schemas/StringFieldUpdateOperationsInput' - int: - oneOf: - - type: integer - - $ref: '#/components/schemas/IntFieldUpdateOperationsInput' - bigInt: - oneOf: - - type: integer - - $ref: '#/components/schemas/BigIntFieldUpdateOperationsInput' - date: - oneOf: - - type: string - format: date-time - - $ref: '#/components/schemas/DateTimeFieldUpdateOperationsInput' - float: - oneOf: - - type: number - - $ref: '#/components/schemas/FloatFieldUpdateOperationsInput' - decimal: - oneOf: - - oneOf: - - type: string - - type: number - - $ref: '#/components/schemas/DecimalFieldUpdateOperationsInput' - boolean: - oneOf: - - type: boolean - - $ref: '#/components/schemas/BoolFieldUpdateOperationsInput' - bytes: - oneOf: - - type: string - format: byte - - $ref: '#/components/schemas/NullableBytesFieldUpdateOperationsInput' - - type: 'null' - StringFilter: - type: object - properties: - equals: - type: string - in: - type: array - items: - type: string - notIn: - type: array - items: - type: string - lt: - type: string - lte: - type: string - gt: - type: string - gte: - type: string - contains: - type: string - startsWith: - type: string - endsWith: - type: string - mode: - $ref: '#/components/schemas/QueryMode' - not: - oneOf: - - type: string - - $ref: '#/components/schemas/NestedStringFilter' - IntFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedIntFilter' - BigIntFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedBigIntFilter' - DateTimeFilter: - type: object - properties: - equals: - type: string - format: date-time - in: - type: array - items: - type: string - format: date-time - notIn: - type: array - items: - type: string - format: date-time - lt: - type: string - format: date-time - lte: - type: string - format: date-time - gt: - type: string - format: date-time - gte: - type: string - format: date-time - not: - oneOf: - - type: string - format: date-time - - $ref: '#/components/schemas/NestedDateTimeFilter' - FloatFilter: - type: object - properties: - equals: - type: number - in: - type: array - items: - type: number - notIn: - type: array - items: - type: number - lt: - type: number - lte: - type: number - gt: - type: number - gte: - type: number - not: - oneOf: - - type: number - - $ref: '#/components/schemas/NestedFloatFilter' - DecimalFilter: - type: object - properties: - equals: - oneOf: - - type: string - - type: number - in: - type: array - items: - oneOf: - - type: string - - type: number - notIn: - type: array - items: - oneOf: - - type: string - - type: number - lt: - oneOf: - - type: string - - type: number - lte: - oneOf: - - type: string - - type: number - gt: - oneOf: - - type: string - - type: number - gte: - oneOf: - - type: string - - type: number - not: - oneOf: - - oneOf: - - type: string - - type: number - - $ref: '#/components/schemas/NestedDecimalFilter' - BoolFilter: - type: object - properties: - equals: - type: boolean - not: - oneOf: - - type: boolean - - $ref: '#/components/schemas/NestedBoolFilter' - BytesNullableFilter: - type: object - properties: - equals: - oneOf: - - type: 'null' - - type: string - format: byte - in: - oneOf: - - type: 'null' - - type: array - items: - type: string - format: byte - notIn: - oneOf: - - type: 'null' - - type: array - items: - type: string - format: byte - not: - oneOf: - - type: string - format: byte - - $ref: '#/components/schemas/NestedBytesNullableFilter' - - type: 'null' - SortOrderInput: - type: object - properties: - sort: - $ref: '#/components/schemas/SortOrder' - nulls: - $ref: '#/components/schemas/NullsOrder' - required: - - sort - StringWithAggregatesFilter: - type: object - properties: - equals: - type: string - in: - type: array - items: - type: string - notIn: - type: array - items: - type: string - lt: - type: string - lte: - type: string - gt: - type: string - gte: - type: string - contains: - type: string - startsWith: - type: string - endsWith: - type: string - mode: - $ref: '#/components/schemas/QueryMode' - not: - oneOf: - - type: string - - $ref: '#/components/schemas/NestedStringWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedStringFilter' - _max: - $ref: '#/components/schemas/NestedStringFilter' - IntWithAggregatesFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedIntWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedFloatFilter' - _sum: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedIntFilter' - _max: - $ref: '#/components/schemas/NestedIntFilter' - BigIntWithAggregatesFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedBigIntWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedFloatFilter' - _sum: - $ref: '#/components/schemas/NestedBigIntFilter' - _min: - $ref: '#/components/schemas/NestedBigIntFilter' - _max: - $ref: '#/components/schemas/NestedBigIntFilter' - DateTimeWithAggregatesFilter: - type: object - properties: - equals: - type: string - format: date-time - in: - type: array - items: - type: string - format: date-time - notIn: - type: array - items: - type: string - format: date-time - lt: - type: string - format: date-time - lte: - type: string - format: date-time - gt: - type: string - format: date-time - gte: - type: string - format: date-time - not: - oneOf: - - type: string - format: date-time - - $ref: '#/components/schemas/NestedDateTimeWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedDateTimeFilter' - _max: - $ref: '#/components/schemas/NestedDateTimeFilter' - FloatWithAggregatesFilter: - type: object - properties: - equals: - type: number - in: - type: array - items: - type: number - notIn: - type: array - items: - type: number - lt: - type: number - lte: - type: number - gt: - type: number - gte: - type: number - not: - oneOf: - - type: number - - $ref: '#/components/schemas/NestedFloatWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedFloatFilter' - _sum: - $ref: '#/components/schemas/NestedFloatFilter' - _min: - $ref: '#/components/schemas/NestedFloatFilter' - _max: - $ref: '#/components/schemas/NestedFloatFilter' - DecimalWithAggregatesFilter: - type: object - properties: - equals: - oneOf: - - type: string - - type: number - in: - type: array - items: - oneOf: - - type: string - - type: number - notIn: - type: array - items: - oneOf: - - type: string - - type: number - lt: - oneOf: - - type: string - - type: number - lte: - oneOf: - - type: string - - type: number - gt: - oneOf: - - type: string - - type: number - gte: - oneOf: - - type: string - - type: number - not: - oneOf: - - oneOf: - - type: string - - type: number - - $ref: '#/components/schemas/NestedDecimalWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedDecimalFilter' - _sum: - $ref: '#/components/schemas/NestedDecimalFilter' - _min: - $ref: '#/components/schemas/NestedDecimalFilter' - _max: - $ref: '#/components/schemas/NestedDecimalFilter' - BoolWithAggregatesFilter: - type: object - properties: - equals: - type: boolean - not: - oneOf: - - type: boolean - - $ref: '#/components/schemas/NestedBoolWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedBoolFilter' - _max: - $ref: '#/components/schemas/NestedBoolFilter' - BytesNullableWithAggregatesFilter: - type: object - properties: - equals: - oneOf: - - type: 'null' - - type: string - format: byte - in: - oneOf: - - type: 'null' - - type: array - items: - type: string - format: byte - notIn: - oneOf: - - type: 'null' - - type: array - items: - type: string - format: byte - not: - oneOf: - - type: string - format: byte - - $ref: '#/components/schemas/NestedBytesNullableWithAggregatesFilter' - - type: 'null' - _count: - $ref: '#/components/schemas/NestedIntNullableFilter' - _min: - $ref: '#/components/schemas/NestedBytesNullableFilter' - _max: - $ref: '#/components/schemas/NestedBytesNullableFilter' - StringFieldUpdateOperationsInput: - type: object - properties: - set: - type: string - IntFieldUpdateOperationsInput: - type: object - properties: - set: - type: integer - increment: - type: integer - decrement: - type: integer - multiply: - type: integer - divide: - type: integer - BigIntFieldUpdateOperationsInput: - type: object - properties: - set: - type: integer - increment: - type: integer - decrement: - type: integer - multiply: - type: integer - divide: - type: integer - DateTimeFieldUpdateOperationsInput: - type: object - properties: - set: - type: string - format: date-time - FloatFieldUpdateOperationsInput: - type: object - properties: - set: - type: number - increment: - type: number - decrement: - type: number - multiply: - type: number - divide: - type: number - DecimalFieldUpdateOperationsInput: - type: object - properties: - set: - oneOf: - - type: string - - type: number - increment: - oneOf: - - type: string - - type: number - decrement: - oneOf: - - type: string - - type: number - multiply: - oneOf: - - type: string - - type: number - divide: - oneOf: - - type: string - - type: number - BoolFieldUpdateOperationsInput: - type: object - properties: - set: - type: boolean - NullableBytesFieldUpdateOperationsInput: - type: object - properties: - set: - oneOf: - - type: 'null' - - type: string - format: byte - NestedStringFilter: - type: object - properties: - equals: - type: string - in: - type: array - items: - type: string - notIn: - type: array - items: - type: string - lt: - type: string - lte: - type: string - gt: - type: string - gte: - type: string - contains: - type: string - startsWith: - type: string - endsWith: - type: string - not: - oneOf: - - type: string - - $ref: '#/components/schemas/NestedStringFilter' - NestedIntFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedIntFilter' - NestedBigIntFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedBigIntFilter' - NestedDateTimeFilter: - type: object - properties: - equals: - type: string - format: date-time - in: - type: array - items: - type: string - format: date-time - notIn: - type: array - items: - type: string - format: date-time - lt: - type: string - format: date-time - lte: - type: string - format: date-time - gt: - type: string - format: date-time - gte: - type: string - format: date-time - not: - oneOf: - - type: string - format: date-time - - $ref: '#/components/schemas/NestedDateTimeFilter' - NestedFloatFilter: - type: object - properties: - equals: - type: number - in: - type: array - items: - type: number - notIn: - type: array - items: - type: number - lt: - type: number - lte: - type: number - gt: - type: number - gte: - type: number - not: - oneOf: - - type: number - - $ref: '#/components/schemas/NestedFloatFilter' - NestedDecimalFilter: - type: object - properties: - equals: - oneOf: - - type: string - - type: number - in: - type: array - items: - oneOf: - - type: string - - type: number - notIn: - type: array - items: - oneOf: - - type: string - - type: number - lt: - oneOf: - - type: string - - type: number - lte: - oneOf: - - type: string - - type: number - gt: - oneOf: - - type: string - - type: number - gte: - oneOf: - - type: string - - type: number - not: - oneOf: - - oneOf: - - type: string - - type: number - - $ref: '#/components/schemas/NestedDecimalFilter' - NestedBoolFilter: - type: object - properties: - equals: - type: boolean - not: - oneOf: - - type: boolean - - $ref: '#/components/schemas/NestedBoolFilter' - NestedBytesNullableFilter: - type: object - properties: - equals: - oneOf: - - type: 'null' - - type: string - format: byte - in: - oneOf: - - type: 'null' - - type: array - items: - type: string - format: byte - notIn: - oneOf: - - type: 'null' - - type: array - items: - type: string - format: byte - not: - oneOf: - - type: string - format: byte - - $ref: '#/components/schemas/NestedBytesNullableFilter' - - type: 'null' - NestedStringWithAggregatesFilter: - type: object - properties: - equals: - type: string - in: - type: array - items: - type: string - notIn: - type: array - items: - type: string - lt: - type: string - lte: - type: string - gt: - type: string - gte: - type: string - contains: - type: string - startsWith: - type: string - endsWith: - type: string - not: - oneOf: - - type: string - - $ref: '#/components/schemas/NestedStringWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedStringFilter' - _max: - $ref: '#/components/schemas/NestedStringFilter' - NestedIntWithAggregatesFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedIntWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedFloatFilter' - _sum: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedIntFilter' - _max: - $ref: '#/components/schemas/NestedIntFilter' - NestedBigIntWithAggregatesFilter: - type: object - properties: - equals: - type: integer - in: - type: array - items: - type: integer - notIn: - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedBigIntWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedFloatFilter' - _sum: - $ref: '#/components/schemas/NestedBigIntFilter' - _min: - $ref: '#/components/schemas/NestedBigIntFilter' - _max: - $ref: '#/components/schemas/NestedBigIntFilter' - NestedDateTimeWithAggregatesFilter: - type: object - properties: - equals: - type: string - format: date-time - in: - type: array - items: - type: string - format: date-time - notIn: - type: array - items: - type: string - format: date-time - lt: - type: string - format: date-time - lte: - type: string - format: date-time - gt: - type: string - format: date-time - gte: - type: string - format: date-time - not: - oneOf: - - type: string - format: date-time - - $ref: '#/components/schemas/NestedDateTimeWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedDateTimeFilter' - _max: - $ref: '#/components/schemas/NestedDateTimeFilter' - NestedFloatWithAggregatesFilter: - type: object - properties: - equals: - type: number - in: - type: array - items: - type: number - notIn: - type: array - items: - type: number - lt: - type: number - lte: - type: number - gt: - type: number - gte: - type: number - not: - oneOf: - - type: number - - $ref: '#/components/schemas/NestedFloatWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedFloatFilter' - _sum: - $ref: '#/components/schemas/NestedFloatFilter' - _min: - $ref: '#/components/schemas/NestedFloatFilter' - _max: - $ref: '#/components/schemas/NestedFloatFilter' - NestedDecimalWithAggregatesFilter: - type: object - properties: - equals: - oneOf: - - type: string - - type: number - in: + format: date-time + lt: + type: string + format: date-time + lte: + type: string + format: date-time + gt: + type: string + format: date-time + gte: + type: string + format: date-time + not: + oneOf: + - type: string + format: date-time + - $ref: "#/components/schemas/NestedDateTimeFilter" + FloatFilter: + type: object + properties: + equals: + type: number + in: + type: array + items: + type: number + notIn: + type: array + items: + type: number + lt: + type: number + lte: + type: number + gt: + type: number + gte: + type: number + not: + oneOf: + - type: number + - $ref: "#/components/schemas/NestedFloatFilter" + DecimalFilter: + type: object + properties: + equals: + oneOf: + - type: string + - type: number + in: + type: array + items: + oneOf: + - type: string + - type: number + notIn: + type: array + items: + oneOf: + - type: string + - type: number + lt: + oneOf: + - type: string + - type: number + lte: + oneOf: + - type: string + - type: number + gt: + oneOf: + - type: string + - type: number + gte: + oneOf: + - type: string + - type: number + not: + oneOf: + - oneOf: + - type: string + - type: number + - $ref: "#/components/schemas/NestedDecimalFilter" + BoolFilter: + type: object + properties: + equals: + type: boolean + not: + oneOf: + - type: boolean + - $ref: "#/components/schemas/NestedBoolFilter" + BytesNullableFilter: + type: object + properties: + equals: + oneOf: + - type: "null" + - type: string + format: byte + in: + oneOf: + - type: "null" + - type: array + items: + type: string + format: byte + notIn: + oneOf: + - type: "null" + - type: array + items: + type: string + format: byte + not: + oneOf: + - type: string + format: byte + - $ref: "#/components/schemas/NestedBytesNullableFilter" + - type: "null" + JsonNullableFilter: + type: object + properties: + equals: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + path: + type: array + items: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + string_contains: + type: string + string_starts_with: + type: string + string_ends_with: + type: string + array_starts_with: + oneOf: + - type: "null" + - {} + array_ends_with: + oneOf: + - type: "null" + - {} + array_contains: + oneOf: + - type: "null" + - {} + lt: {} + lte: {} + gt: {} + gte: {} + not: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + JsonFilter: + type: object + properties: + equals: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + path: + type: array + items: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + string_contains: + type: string + string_starts_with: + type: string + string_ends_with: + type: string + array_starts_with: + oneOf: + - type: "null" + - {} + array_ends_with: + oneOf: + - type: "null" + - {} + array_contains: + oneOf: + - type: "null" + - {} + lt: {} + lte: {} + gt: {} + gte: {} + not: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + SortOrderInput: + type: object + properties: + sort: + $ref: "#/components/schemas/SortOrder" + nulls: + $ref: "#/components/schemas/NullsOrder" + required: + - sort + StringWithAggregatesFilter: + type: object + properties: + equals: + type: string + in: + type: array + items: + type: string + notIn: + type: array + items: + type: string + lt: + type: string + lte: + type: string + gt: + type: string + gte: + type: string + contains: + type: string + startsWith: + type: string + endsWith: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + not: + oneOf: + - type: string + - $ref: "#/components/schemas/NestedStringWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedStringFilter" + _max: + $ref: "#/components/schemas/NestedStringFilter" + IntWithAggregatesFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedIntWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedFloatFilter" + _sum: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedIntFilter" + _max: + $ref: "#/components/schemas/NestedIntFilter" + BigIntWithAggregatesFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedBigIntWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedFloatFilter" + _sum: + $ref: "#/components/schemas/NestedBigIntFilter" + _min: + $ref: "#/components/schemas/NestedBigIntFilter" + _max: + $ref: "#/components/schemas/NestedBigIntFilter" + DateTimeWithAggregatesFilter: + type: object + properties: + equals: + type: string + format: date-time + in: + type: array + items: + type: string + format: date-time + notIn: + type: array + items: + type: string + format: date-time + lt: + type: string + format: date-time + lte: + type: string + format: date-time + gt: + type: string + format: date-time + gte: + type: string + format: date-time + not: + oneOf: + - type: string + format: date-time + - $ref: "#/components/schemas/NestedDateTimeWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedDateTimeFilter" + _max: + $ref: "#/components/schemas/NestedDateTimeFilter" + FloatWithAggregatesFilter: + type: object + properties: + equals: + type: number + in: + type: array + items: + type: number + notIn: + type: array + items: + type: number + lt: + type: number + lte: + type: number + gt: + type: number + gte: + type: number + not: + oneOf: + - type: number + - $ref: "#/components/schemas/NestedFloatWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedFloatFilter" + _sum: + $ref: "#/components/schemas/NestedFloatFilter" + _min: + $ref: "#/components/schemas/NestedFloatFilter" + _max: + $ref: "#/components/schemas/NestedFloatFilter" + DecimalWithAggregatesFilter: + type: object + properties: + equals: + oneOf: + - type: string + - type: number + in: + type: array + items: + oneOf: + - type: string + - type: number + notIn: + type: array + items: + oneOf: + - type: string + - type: number + lt: + oneOf: + - type: string + - type: number + lte: + oneOf: + - type: string + - type: number + gt: + oneOf: + - type: string + - type: number + gte: + oneOf: + - type: string + - type: number + not: + oneOf: + - oneOf: + - type: string + - type: number + - $ref: "#/components/schemas/NestedDecimalWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedDecimalFilter" + _sum: + $ref: "#/components/schemas/NestedDecimalFilter" + _min: + $ref: "#/components/schemas/NestedDecimalFilter" + _max: + $ref: "#/components/schemas/NestedDecimalFilter" + BoolWithAggregatesFilter: + type: object + properties: + equals: + type: boolean + not: + oneOf: + - type: boolean + - $ref: "#/components/schemas/NestedBoolWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedBoolFilter" + _max: + $ref: "#/components/schemas/NestedBoolFilter" + BytesNullableWithAggregatesFilter: + type: object + properties: + equals: + oneOf: + - type: "null" + - type: string + format: byte + in: + oneOf: + - type: "null" + - type: array + items: + type: string + format: byte + notIn: + oneOf: + - type: "null" + - type: array + items: + type: string + format: byte + not: + oneOf: + - type: string + format: byte + - $ref: "#/components/schemas/NestedBytesNullableWithAggregatesFilter" + - type: "null" + _count: + $ref: "#/components/schemas/NestedIntNullableFilter" + _min: + $ref: "#/components/schemas/NestedBytesNullableFilter" + _max: + $ref: "#/components/schemas/NestedBytesNullableFilter" + JsonNullableWithAggregatesFilter: + type: object + properties: + equals: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + path: + type: array + items: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + string_contains: + type: string + string_starts_with: + type: string + string_ends_with: + type: string + array_starts_with: + oneOf: + - type: "null" + - {} + array_ends_with: + oneOf: + - type: "null" + - {} + array_contains: + oneOf: + - type: "null" + - {} + lt: {} + lte: {} + gt: {} + gte: {} + not: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + _count: + $ref: "#/components/schemas/NestedIntNullableFilter" + _min: + $ref: "#/components/schemas/NestedJsonNullableFilter" + _max: + $ref: "#/components/schemas/NestedJsonNullableFilter" + JsonWithAggregatesFilter: + type: object + properties: + equals: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + path: + type: array + items: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + string_contains: + type: string + string_starts_with: + type: string + string_ends_with: + type: string + array_starts_with: + oneOf: + - type: "null" + - {} + array_ends_with: + oneOf: + - type: "null" + - {} + array_contains: + oneOf: + - type: "null" + - {} + lt: {} + lte: {} + gt: {} + gte: {} + not: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedJsonFilter" + _max: + $ref: "#/components/schemas/NestedJsonFilter" + StringFieldUpdateOperationsInput: + type: object + properties: + set: + type: string + IntFieldUpdateOperationsInput: + type: object + properties: + set: + type: integer + increment: + type: integer + decrement: + type: integer + multiply: + type: integer + divide: + type: integer + BigIntFieldUpdateOperationsInput: + type: object + properties: + set: + type: integer + increment: + type: integer + decrement: + type: integer + multiply: + type: integer + divide: + type: integer + DateTimeFieldUpdateOperationsInput: + type: object + properties: + set: + type: string + format: date-time + FloatFieldUpdateOperationsInput: + type: object + properties: + set: + type: number + increment: + type: number + decrement: + type: number + multiply: + type: number + divide: + type: number + DecimalFieldUpdateOperationsInput: + type: object + properties: + set: + oneOf: + - type: string + - type: number + increment: + oneOf: + - type: string + - type: number + decrement: + oneOf: + - type: string + - type: number + multiply: + oneOf: + - type: string + - type: number + divide: + oneOf: + - type: string + - type: number + BoolFieldUpdateOperationsInput: + type: object + properties: + set: + type: boolean + NullableBytesFieldUpdateOperationsInput: + type: object + properties: + set: + oneOf: + - type: "null" + - type: string + format: byte + NestedStringFilter: + type: object + properties: + equals: + type: string + in: + type: array + items: + type: string + notIn: + type: array + items: + type: string + lt: + type: string + lte: + type: string + gt: + type: string + gte: + type: string + contains: + type: string + startsWith: + type: string + endsWith: + type: string + not: + oneOf: + - type: string + - $ref: "#/components/schemas/NestedStringFilter" + NestedIntFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedIntFilter" + NestedBigIntFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedBigIntFilter" + NestedDateTimeFilter: + type: object + properties: + equals: + type: string + format: date-time + in: + type: array + items: + type: string + format: date-time + notIn: + type: array + items: + type: string + format: date-time + lt: + type: string + format: date-time + lte: + type: string + format: date-time + gt: + type: string + format: date-time + gte: + type: string + format: date-time + not: + oneOf: + - type: string + format: date-time + - $ref: "#/components/schemas/NestedDateTimeFilter" + NestedFloatFilter: + type: object + properties: + equals: + type: number + in: + type: array + items: + type: number + notIn: + type: array + items: + type: number + lt: + type: number + lte: + type: number + gt: + type: number + gte: + type: number + not: + oneOf: + - type: number + - $ref: "#/components/schemas/NestedFloatFilter" + NestedDecimalFilter: + type: object + properties: + equals: + oneOf: + - type: string + - type: number + in: + type: array + items: + oneOf: + - type: string + - type: number + notIn: + type: array + items: + oneOf: + - type: string + - type: number + lt: + oneOf: + - type: string + - type: number + lte: + oneOf: + - type: string + - type: number + gt: + oneOf: + - type: string + - type: number + gte: + oneOf: + - type: string + - type: number + not: + oneOf: + - oneOf: + - type: string + - type: number + - $ref: "#/components/schemas/NestedDecimalFilter" + NestedBoolFilter: + type: object + properties: + equals: + type: boolean + not: + oneOf: + - type: boolean + - $ref: "#/components/schemas/NestedBoolFilter" + NestedBytesNullableFilter: + type: object + properties: + equals: + oneOf: + - type: "null" + - type: string + format: byte + in: + oneOf: + - type: "null" + - type: array + items: + type: string + format: byte + notIn: + oneOf: + - type: "null" + - type: array + items: + type: string + format: byte + not: + oneOf: + - type: string + format: byte + - $ref: "#/components/schemas/NestedBytesNullableFilter" + - type: "null" + NestedStringWithAggregatesFilter: + type: object + properties: + equals: + type: string + in: + type: array + items: + type: string + notIn: + type: array + items: + type: string + lt: + type: string + lte: + type: string + gt: + type: string + gte: + type: string + contains: + type: string + startsWith: + type: string + endsWith: + type: string + not: + oneOf: + - type: string + - $ref: "#/components/schemas/NestedStringWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedStringFilter" + _max: + $ref: "#/components/schemas/NestedStringFilter" + NestedIntWithAggregatesFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedIntWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedFloatFilter" + _sum: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedIntFilter" + _max: + $ref: "#/components/schemas/NestedIntFilter" + NestedBigIntWithAggregatesFilter: + type: object + properties: + equals: + type: integer + in: + type: array + items: + type: integer + notIn: + type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedBigIntWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedFloatFilter" + _sum: + $ref: "#/components/schemas/NestedBigIntFilter" + _min: + $ref: "#/components/schemas/NestedBigIntFilter" + _max: + $ref: "#/components/schemas/NestedBigIntFilter" + NestedDateTimeWithAggregatesFilter: + type: object + properties: + equals: + type: string + format: date-time + in: + type: array + items: + type: string + format: date-time + notIn: + type: array + items: + type: string + format: date-time + lt: + type: string + format: date-time + lte: + type: string + format: date-time + gt: + type: string + format: date-time + gte: + type: string + format: date-time + not: + oneOf: + - type: string + format: date-time + - $ref: "#/components/schemas/NestedDateTimeWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedDateTimeFilter" + _max: + $ref: "#/components/schemas/NestedDateTimeFilter" + NestedFloatWithAggregatesFilter: + type: object + properties: + equals: + type: number + in: + type: array + items: + type: number + notIn: + type: array + items: + type: number + lt: + type: number + lte: + type: number + gt: + type: number + gte: + type: number + not: + oneOf: + - type: number + - $ref: "#/components/schemas/NestedFloatWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedFloatFilter" + _sum: + $ref: "#/components/schemas/NestedFloatFilter" + _min: + $ref: "#/components/schemas/NestedFloatFilter" + _max: + $ref: "#/components/schemas/NestedFloatFilter" + NestedDecimalWithAggregatesFilter: + type: object + properties: + equals: + oneOf: + - type: string + - type: number + in: + type: array + items: + oneOf: + - type: string + - type: number + notIn: + type: array + items: + oneOf: + - type: string + - type: number + lt: + oneOf: + - type: string + - type: number + lte: + oneOf: + - type: string + - type: number + gt: + oneOf: + - type: string + - type: number + gte: + oneOf: + - type: string + - type: number + not: + oneOf: + - oneOf: + - type: string + - type: number + - $ref: "#/components/schemas/NestedDecimalWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _avg: + $ref: "#/components/schemas/NestedDecimalFilter" + _sum: + $ref: "#/components/schemas/NestedDecimalFilter" + _min: + $ref: "#/components/schemas/NestedDecimalFilter" + _max: + $ref: "#/components/schemas/NestedDecimalFilter" + NestedBoolWithAggregatesFilter: + type: object + properties: + equals: + type: boolean + not: + oneOf: + - type: boolean + - $ref: "#/components/schemas/NestedBoolWithAggregatesFilter" + _count: + $ref: "#/components/schemas/NestedIntFilter" + _min: + $ref: "#/components/schemas/NestedBoolFilter" + _max: + $ref: "#/components/schemas/NestedBoolFilter" + NestedBytesNullableWithAggregatesFilter: + type: object + properties: + equals: + oneOf: + - type: "null" + - type: string + format: byte + in: + oneOf: + - type: "null" + - type: array + items: + type: string + format: byte + notIn: + oneOf: + - type: "null" + - type: array + items: + type: string + format: byte + not: + oneOf: + - type: string + format: byte + - $ref: "#/components/schemas/NestedBytesNullableWithAggregatesFilter" + - type: "null" + _count: + $ref: "#/components/schemas/NestedIntNullableFilter" + _min: + $ref: "#/components/schemas/NestedBytesNullableFilter" + _max: + $ref: "#/components/schemas/NestedBytesNullableFilter" + NestedIntNullableFilter: + type: object + properties: + equals: + oneOf: + - type: "null" + - type: integer + in: + oneOf: + - type: "null" + - type: array + items: + type: integer + notIn: + oneOf: + - type: "null" + - type: array + items: + type: integer + lt: + type: integer + lte: + type: integer + gt: + type: integer + gte: + type: integer + not: + oneOf: + - type: integer + - $ref: "#/components/schemas/NestedIntNullableFilter" + - type: "null" + NestedJsonNullableFilter: + type: object + properties: + equals: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + path: + type: array + items: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + string_contains: + type: string + string_starts_with: + type: string + string_ends_with: + type: string + array_starts_with: + oneOf: + - type: "null" + - {} + array_ends_with: + oneOf: + - type: "null" + - {} + array_contains: + oneOf: + - type: "null" + - {} + lt: {} + lte: {} + gt: {} + gte: {} + not: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + NestedJsonFilter: + type: object + properties: + equals: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + path: + type: array + items: + type: string + mode: + $ref: "#/components/schemas/QueryMode" + string_contains: + type: string + string_starts_with: + type: string + string_ends_with: + type: string + array_starts_with: + oneOf: + - type: "null" + - {} + array_ends_with: + oneOf: + - type: "null" + - {} + array_contains: + oneOf: + - type: "null" + - {} + lt: {} + lte: {} + gt: {} + gte: {} + not: + oneOf: + - {} + - $ref: "#/components/schemas/JsonNullValueFilter" + FooSelect: + type: object + properties: + id: + type: boolean + string: + type: boolean + int: + type: boolean + bigInt: + type: boolean + date: + type: boolean + float: + type: boolean + decimal: + type: boolean + boolean: + type: boolean + bytes: + type: boolean + json: + type: boolean + plainJson: + type: boolean + FooCountAggregateInput: + type: object + properties: + id: + type: boolean + string: + type: boolean + int: + type: boolean + bigInt: + type: boolean + date: + type: boolean + float: + type: boolean + decimal: + type: boolean + boolean: + type: boolean + bytes: + type: boolean + json: + type: boolean + plainJson: + type: boolean + _all: + type: boolean + FooAvgAggregateInput: + type: object + properties: + int: + type: boolean + bigInt: + type: boolean + float: + type: boolean + decimal: + type: boolean + FooSumAggregateInput: + type: object + properties: + int: + type: boolean + bigInt: + type: boolean + float: + type: boolean + decimal: + type: boolean + FooMinAggregateInput: + type: object + properties: + id: + type: boolean + string: + type: boolean + int: + type: boolean + bigInt: + type: boolean + date: + type: boolean + float: + type: boolean + decimal: + type: boolean + boolean: + type: boolean + bytes: + type: boolean + FooMaxAggregateInput: + type: object + properties: + id: + type: boolean + string: + type: boolean + int: + type: boolean + bigInt: + type: boolean + date: + type: boolean + float: + type: boolean + decimal: + type: boolean + boolean: + type: boolean + bytes: + type: boolean + AggregateFoo: + type: object + properties: + _count: + oneOf: + - type: "null" + - $ref: "#/components/schemas/FooCountAggregateOutputType" + _avg: + oneOf: + - type: "null" + - $ref: "#/components/schemas/FooAvgAggregateOutputType" + _sum: + oneOf: + - type: "null" + - $ref: "#/components/schemas/FooSumAggregateOutputType" + _min: + oneOf: + - type: "null" + - $ref: "#/components/schemas/FooMinAggregateOutputType" + _max: + oneOf: + - type: "null" + - $ref: "#/components/schemas/FooMaxAggregateOutputType" + FooGroupByOutputType: + type: object + properties: + id: + type: string + string: + type: string + int: + type: integer + bigInt: + type: integer + date: + type: string + format: date-time + float: + type: number + decimal: + oneOf: + - type: string + - type: number + boolean: + type: boolean + bytes: + oneOf: + - type: "null" + - type: string + format: byte + json: + oneOf: + - type: "null" + - {} + plainJson: {} + _count: + oneOf: + - type: "null" + - $ref: "#/components/schemas/FooCountAggregateOutputType" + _avg: + oneOf: + - type: "null" + - $ref: "#/components/schemas/FooAvgAggregateOutputType" + _sum: + oneOf: + - type: "null" + - $ref: "#/components/schemas/FooSumAggregateOutputType" + _min: + oneOf: + - type: "null" + - $ref: "#/components/schemas/FooMinAggregateOutputType" + _max: + oneOf: + - type: "null" + - $ref: "#/components/schemas/FooMaxAggregateOutputType" + required: + - id + - string + - int + - bigInt + - date + - float + - decimal + - boolean + - plainJson + FooCountAggregateOutputType: + type: object + properties: + id: + type: integer + string: + type: integer + int: + type: integer + bigInt: + type: integer + date: + type: integer + float: + type: integer + decimal: + type: integer + boolean: + type: integer + bytes: + type: integer + json: + type: integer + plainJson: + type: integer + _all: + type: integer + required: + - id + - string + - int + - bigInt + - date + - float + - decimal + - boolean + - bytes + - json + - plainJson + - _all + FooAvgAggregateOutputType: + type: object + properties: + int: + oneOf: + - type: "null" + - type: number + bigInt: + oneOf: + - type: "null" + - type: number + float: + oneOf: + - type: "null" + - type: number + decimal: + oneOf: + - type: string + - type: number + - type: "null" + FooSumAggregateOutputType: + type: object + properties: + int: + oneOf: + - type: "null" + - type: integer + bigInt: + oneOf: + - type: "null" + - type: integer + float: + oneOf: + - type: "null" + - type: number + decimal: + oneOf: + - type: string + - type: number + - type: "null" + FooMinAggregateOutputType: + type: object + properties: + id: + oneOf: + - type: "null" + - type: string + string: + oneOf: + - type: "null" + - type: string + int: + oneOf: + - type: "null" + - type: integer + bigInt: + oneOf: + - type: "null" + - type: integer + date: + oneOf: + - type: "null" + - type: string + format: date-time + float: + oneOf: + - type: "null" + - type: number + decimal: + oneOf: + - type: string + - type: number + - type: "null" + boolean: + oneOf: + - type: "null" + - type: boolean + bytes: + oneOf: + - type: "null" + - type: string + format: byte + FooMaxAggregateOutputType: + type: object + properties: + id: + oneOf: + - type: "null" + - type: string + string: + oneOf: + - type: "null" + - type: string + int: + oneOf: + - type: "null" + - type: integer + bigInt: + oneOf: + - type: "null" + - type: integer + date: + oneOf: + - type: "null" + - type: string + format: date-time + float: + oneOf: + - type: "null" + - type: number + decimal: + oneOf: + - type: string + - type: number + - type: "null" + boolean: + oneOf: + - type: "null" + - type: boolean + bytes: + oneOf: + - type: "null" + - type: string + format: byte + _Meta: + type: object + description: Meta information about the request or response + properties: + serialization: + description: Serialization metadata + additionalProperties: true + _Error: + type: object + required: + - error + properties: + error: + type: object + required: + - message + properties: + prisma: + type: boolean + description: Indicates if the error occurred during a Prisma call + rejectedByPolicy: + type: boolean + description: Indicates if the error was due to rejection by a policy + code: + type: string + description: Prisma error code. Only available when "prisma" field is true. + message: + type: string + description: Error message + reason: + type: string + description: Detailed error reason + zodErrors: + type: object + additionalProperties: true + description: Zod validation errors if the error is due to data validation + failure + additionalProperties: true + BatchPayload: + type: object + properties: + count: + type: integer + FooCreateArgs: + type: object + required: + - data + properties: + select: + $ref: "#/components/schemas/FooSelect" + data: + $ref: "#/components/schemas/FooCreateInput" + meta: + $ref: "#/components/schemas/_Meta" + FooCreateManyArgs: + type: object + required: + - data + properties: + data: + oneOf: + - $ref: "#/components/schemas/FooCreateManyInput" + - type: array + items: + $ref: "#/components/schemas/FooCreateManyInput" + skipDuplicates: + type: boolean + description: Do not insert records with unique fields or ID fields that already + exist. + meta: + $ref: "#/components/schemas/_Meta" + FooFindUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: "#/components/schemas/FooSelect" + where: + $ref: "#/components/schemas/FooWhereUniqueInput" + meta: + $ref: "#/components/schemas/_Meta" + FooFindFirstArgs: + type: object + properties: + select: + $ref: "#/components/schemas/FooSelect" + where: + $ref: "#/components/schemas/FooWhereInput" + meta: + $ref: "#/components/schemas/_Meta" + FooFindManyArgs: + type: object + properties: + select: + $ref: "#/components/schemas/FooSelect" + where: + $ref: "#/components/schemas/FooWhereInput" + meta: + $ref: "#/components/schemas/_Meta" + FooUpdateArgs: + type: object + required: + - where + - data + properties: + select: + $ref: "#/components/schemas/FooSelect" + where: + $ref: "#/components/schemas/FooWhereUniqueInput" + data: + $ref: "#/components/schemas/FooUpdateInput" + meta: + $ref: "#/components/schemas/_Meta" + FooUpdateManyArgs: + type: object + required: + - data + properties: + where: + $ref: "#/components/schemas/FooWhereInput" + data: + $ref: "#/components/schemas/FooUpdateManyMutationInput" + meta: + $ref: "#/components/schemas/_Meta" + FooUpsertArgs: + type: object + required: + - create + - update + - where + properties: + select: + $ref: "#/components/schemas/FooSelect" + where: + $ref: "#/components/schemas/FooWhereUniqueInput" + create: + $ref: "#/components/schemas/FooCreateInput" + update: + $ref: "#/components/schemas/FooUpdateInput" + meta: + $ref: "#/components/schemas/_Meta" + FooDeleteUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: "#/components/schemas/FooSelect" + where: + $ref: "#/components/schemas/FooWhereUniqueInput" + meta: + $ref: "#/components/schemas/_Meta" + FooDeleteManyArgs: + type: object + properties: + where: + $ref: "#/components/schemas/FooWhereInput" + meta: + $ref: "#/components/schemas/_Meta" + FooCountArgs: + type: object + properties: + select: + $ref: "#/components/schemas/FooSelect" + where: + $ref: "#/components/schemas/FooWhereInput" + meta: + $ref: "#/components/schemas/_Meta" + FooAggregateArgs: + type: object + properties: + where: + $ref: "#/components/schemas/FooWhereInput" + orderBy: + $ref: "#/components/schemas/FooOrderByWithRelationInput" + cursor: + $ref: "#/components/schemas/FooWhereUniqueInput" + take: + type: integer + skip: + type: integer + _count: + oneOf: + - type: boolean + - $ref: "#/components/schemas/FooCountAggregateInput" + _min: + $ref: "#/components/schemas/FooMinAggregateInput" + _max: + $ref: "#/components/schemas/FooMaxAggregateInput" + _sum: + $ref: "#/components/schemas/FooSumAggregateInput" + _avg: + $ref: "#/components/schemas/FooAvgAggregateInput" + meta: + $ref: "#/components/schemas/_Meta" + FooGroupByArgs: + type: object + properties: + where: + $ref: "#/components/schemas/FooWhereInput" + orderBy: + $ref: "#/components/schemas/FooOrderByWithRelationInput" + by: + $ref: "#/components/schemas/FooScalarFieldEnum" + having: + $ref: "#/components/schemas/FooScalarWhereWithAggregatesInput" + take: + type: integer + skip: + type: integer + _count: + oneOf: + - type: boolean + - $ref: "#/components/schemas/FooCountAggregateInput" + _min: + $ref: "#/components/schemas/FooMinAggregateInput" + _max: + $ref: "#/components/schemas/FooMaxAggregateInput" + _sum: + $ref: "#/components/schemas/FooSumAggregateInput" + _avg: + $ref: "#/components/schemas/FooAvgAggregateInput" + meta: + $ref: "#/components/schemas/_Meta" +paths: + /foo/create: + post: + operationId: createFoo + description: Create a new Foo + tags: + - foo + security: [] + responses: + "201": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/Foo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FooCreateArgs" + /foo/createMany: + post: + operationId: createManyFoo + description: Create several Foo + tags: + - foo + security: [] + responses: + "201": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/BatchPayload" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FooCreateManyArgs" + /foo/findUnique: + get: + operationId: findUniqueFoo + description: Find one unique Foo + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/Foo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooFindUniqueArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /foo/findFirst: + get: + operationId: findFirstFoo + description: Find the first Foo matching the given condition + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/Foo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooFindFirstArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /foo/findMany: + get: + operationId: findManyFoo + description: Find a list of Foo + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: type: array items: - oneOf: - - type: string - - type: number - notIn: + $ref: "#/components/schemas/Foo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooFindManyArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /foo/update: + patch: + operationId: updateFoo + description: Update a Foo + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/Foo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FooUpdateArgs" + /foo/updateMany: + patch: + operationId: updateManyFoo + description: Update Foos matching the given condition + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/BatchPayload" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FooUpdateManyArgs" + /foo/upsert: + post: + operationId: upsertFoo + description: Upsert a Foo + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/Foo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FooUpsertArgs" + /foo/delete: + delete: + operationId: deleteFoo + description: Delete one unique Foo + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/Foo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooDeleteUniqueArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /foo/deleteMany: + delete: + operationId: deleteManyFoo + description: Delete Foos matching the given condition + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/BatchPayload" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooDeleteManyArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /foo/count: + get: + operationId: countFoo + description: Find a list of Foo + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + oneOf: + - type: integer + - $ref: "#/components/schemas/FooCountAggregateOutputType" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooCountArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /foo/aggregate: + get: + operationId: aggregateFoo + description: Aggregate Foos + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: "#/components/schemas/AggregateFoo" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooAggregateArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /foo/groupBy: + get: + operationId: groupByFoo + description: Group Foos by fields + tags: + - foo + security: [] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: type: array items: - oneOf: - - type: string - - type: number - lt: - oneOf: - - type: string - - type: number - lte: - oneOf: - - type: string - - type: number - gt: - oneOf: - - type: string - - type: number - gte: - oneOf: - - type: string - - type: number - not: - oneOf: - - oneOf: - - type: string - - type: number - - $ref: '#/components/schemas/NestedDecimalWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _avg: - $ref: '#/components/schemas/NestedDecimalFilter' - _sum: - $ref: '#/components/schemas/NestedDecimalFilter' - _min: - $ref: '#/components/schemas/NestedDecimalFilter' - _max: - $ref: '#/components/schemas/NestedDecimalFilter' - NestedBoolWithAggregatesFilter: - type: object - properties: - equals: - type: boolean - not: - oneOf: - - type: boolean - - $ref: '#/components/schemas/NestedBoolWithAggregatesFilter' - _count: - $ref: '#/components/schemas/NestedIntFilter' - _min: - $ref: '#/components/schemas/NestedBoolFilter' - _max: - $ref: '#/components/schemas/NestedBoolFilter' - NestedBytesNullableWithAggregatesFilter: - type: object - properties: - equals: - oneOf: - - type: 'null' - - type: string - format: byte - in: - oneOf: - - type: 'null' - - type: array - items: - type: string - format: byte - notIn: - oneOf: - - type: 'null' - - type: array - items: - type: string - format: byte - not: - oneOf: - - type: string - format: byte - - $ref: '#/components/schemas/NestedBytesNullableWithAggregatesFilter' - - type: 'null' - _count: - $ref: '#/components/schemas/NestedIntNullableFilter' - _min: - $ref: '#/components/schemas/NestedBytesNullableFilter' - _max: - $ref: '#/components/schemas/NestedBytesNullableFilter' - NestedIntNullableFilter: - type: object - properties: - equals: - oneOf: - - type: 'null' - - type: integer - in: - oneOf: - - type: 'null' - - type: array - items: - type: integer - notIn: - oneOf: - - type: 'null' - - type: array - items: - type: integer - lt: - type: integer - lte: - type: integer - gt: - type: integer - gte: - type: integer - not: - oneOf: - - type: integer - - $ref: '#/components/schemas/NestedIntNullableFilter' - - type: 'null' - FooSelect: - type: object - properties: - id: - type: boolean - string: - type: boolean - int: - type: boolean - bigInt: - type: boolean - date: - type: boolean - float: - type: boolean - decimal: - type: boolean - boolean: - type: boolean - bytes: - type: boolean - FooCountAggregateInput: - type: object - properties: - id: - type: boolean - string: - type: boolean - int: - type: boolean - bigInt: - type: boolean - date: - type: boolean - float: - type: boolean - decimal: - type: boolean - boolean: - type: boolean - bytes: - type: boolean - _all: - type: boolean - FooAvgAggregateInput: - type: object - properties: - int: - type: boolean - bigInt: - type: boolean - float: - type: boolean - decimal: - type: boolean - FooSumAggregateInput: - type: object - properties: - int: - type: boolean - bigInt: - type: boolean - float: - type: boolean - decimal: - type: boolean - FooMinAggregateInput: - type: object - properties: - id: - type: boolean - string: - type: boolean - int: - type: boolean - bigInt: - type: boolean - date: - type: boolean - float: - type: boolean - decimal: - type: boolean - boolean: - type: boolean - bytes: - type: boolean - FooMaxAggregateInput: - type: object - properties: - id: - type: boolean - string: - type: boolean - int: - type: boolean - bigInt: - type: boolean - date: - type: boolean - float: - type: boolean - decimal: - type: boolean - boolean: - type: boolean - bytes: - type: boolean - AggregateFoo: - type: object - properties: - _count: - oneOf: - - type: 'null' - - $ref: '#/components/schemas/FooCountAggregateOutputType' - _avg: - oneOf: - - type: 'null' - - $ref: '#/components/schemas/FooAvgAggregateOutputType' - _sum: - oneOf: - - type: 'null' - - $ref: '#/components/schemas/FooSumAggregateOutputType' - _min: - oneOf: - - type: 'null' - - $ref: '#/components/schemas/FooMinAggregateOutputType' - _max: - oneOf: - - type: 'null' - - $ref: '#/components/schemas/FooMaxAggregateOutputType' - FooGroupByOutputType: - type: object - properties: - id: - type: string - string: - type: string - int: - type: integer - bigInt: - type: integer - date: - type: string - format: date-time - float: - type: number - decimal: - oneOf: - - type: string - - type: number - boolean: - type: boolean - bytes: - oneOf: - - type: 'null' - - type: string - format: byte - _count: - oneOf: - - type: 'null' - - $ref: '#/components/schemas/FooCountAggregateOutputType' - _avg: - oneOf: - - type: 'null' - - $ref: '#/components/schemas/FooAvgAggregateOutputType' - _sum: - oneOf: - - type: 'null' - - $ref: '#/components/schemas/FooSumAggregateOutputType' - _min: - oneOf: - - type: 'null' - - $ref: '#/components/schemas/FooMinAggregateOutputType' - _max: - oneOf: - - type: 'null' - - $ref: '#/components/schemas/FooMaxAggregateOutputType' - required: - - id - - string - - int - - bigInt - - date - - float - - decimal - - boolean - FooCountAggregateOutputType: - type: object - properties: - id: - type: integer - string: - type: integer - int: - type: integer - bigInt: - type: integer - date: - type: integer - float: - type: integer - decimal: - type: integer - boolean: - type: integer - bytes: - type: integer - _all: - type: integer - required: - - id - - string - - int - - bigInt - - date - - float - - decimal - - boolean - - bytes - - _all - FooAvgAggregateOutputType: - type: object - properties: - int: - oneOf: - - type: 'null' - - type: number - bigInt: - oneOf: - - type: 'null' - - type: number - float: - oneOf: - - type: 'null' - - type: number - decimal: - oneOf: - - type: string - - type: number - - type: 'null' - FooSumAggregateOutputType: - type: object - properties: - int: - oneOf: - - type: 'null' - - type: integer - bigInt: - oneOf: - - type: 'null' - - type: integer - float: - oneOf: - - type: 'null' - - type: number - decimal: - oneOf: - - type: string - - type: number - - type: 'null' - FooMinAggregateOutputType: - type: object - properties: - id: - oneOf: - - type: 'null' - - type: string - string: - oneOf: - - type: 'null' - - type: string - int: - oneOf: - - type: 'null' - - type: integer - bigInt: - oneOf: - - type: 'null' - - type: integer - date: - oneOf: - - type: 'null' - - type: string - format: date-time - float: - oneOf: - - type: 'null' - - type: number - decimal: - oneOf: - - type: string - - type: number - - type: 'null' - boolean: - oneOf: - - type: 'null' - - type: boolean - bytes: - oneOf: - - type: 'null' - - type: string - format: byte - FooMaxAggregateOutputType: - type: object - properties: - id: - oneOf: - - type: 'null' - - type: string - string: - oneOf: - - type: 'null' - - type: string - int: - oneOf: - - type: 'null' - - type: integer - bigInt: - oneOf: - - type: 'null' - - type: integer - date: - oneOf: - - type: 'null' - - type: string - format: date-time - float: - oneOf: - - type: 'null' - - type: number - decimal: - oneOf: - - type: string - - type: number - - type: 'null' - boolean: - oneOf: - - type: 'null' - - type: boolean - bytes: - oneOf: - - type: 'null' - - type: string - format: byte - _Meta: - type: object - description: Meta information about the request or response - properties: - serialization: - description: Serialization metadata - additionalProperties: true - _Error: - type: object - required: - - error - properties: - error: - type: object - required: - - message - properties: - prisma: - type: boolean - description: Indicates if the error occurred during a Prisma call - rejectedByPolicy: - type: boolean - description: Indicates if the error was due to rejection by a policy - code: - type: string - description: Prisma error code. Only available when "prisma" field is true. - message: - type: string - description: Error message - reason: - type: string - description: Detailed error reason - zodErrors: - type: object - additionalProperties: true - description: Zod validation errors if the error is due to data validation - failure - additionalProperties: true - BatchPayload: - type: object - properties: - count: - type: integer - FooCreateArgs: - type: object - required: - - data - properties: - select: - $ref: '#/components/schemas/FooSelect' - data: - $ref: '#/components/schemas/FooCreateInput' - meta: - $ref: '#/components/schemas/_Meta' - FooCreateManyArgs: - type: object - required: - - data - properties: - data: - oneOf: - - $ref: '#/components/schemas/FooCreateManyInput' - - type: array - items: - $ref: '#/components/schemas/FooCreateManyInput' - skipDuplicates: - type: boolean - description: Do not insert records with unique fields or ID fields that already - exist. - meta: - $ref: '#/components/schemas/_Meta' - FooFindUniqueArgs: - type: object - required: - - where - properties: - select: - $ref: '#/components/schemas/FooSelect' - where: - $ref: '#/components/schemas/FooWhereUniqueInput' - meta: - $ref: '#/components/schemas/_Meta' - FooFindFirstArgs: - type: object - properties: - select: - $ref: '#/components/schemas/FooSelect' - where: - $ref: '#/components/schemas/FooWhereInput' - meta: - $ref: '#/components/schemas/_Meta' - FooFindManyArgs: - type: object - properties: - select: - $ref: '#/components/schemas/FooSelect' - where: - $ref: '#/components/schemas/FooWhereInput' - meta: - $ref: '#/components/schemas/_Meta' - FooUpdateArgs: - type: object - required: - - where - - data - properties: - select: - $ref: '#/components/schemas/FooSelect' - where: - $ref: '#/components/schemas/FooWhereUniqueInput' - data: - $ref: '#/components/schemas/FooUpdateInput' - meta: - $ref: '#/components/schemas/_Meta' - FooUpdateManyArgs: - type: object - required: - - data - properties: - where: - $ref: '#/components/schemas/FooWhereInput' - data: - $ref: '#/components/schemas/FooUpdateManyMutationInput' - meta: - $ref: '#/components/schemas/_Meta' - FooUpsertArgs: - type: object - required: - - create - - update - - where - properties: - select: - $ref: '#/components/schemas/FooSelect' - where: - $ref: '#/components/schemas/FooWhereUniqueInput' - create: - $ref: '#/components/schemas/FooCreateInput' - update: - $ref: '#/components/schemas/FooUpdateInput' - meta: - $ref: '#/components/schemas/_Meta' - FooDeleteUniqueArgs: - type: object - required: - - where - properties: - select: - $ref: '#/components/schemas/FooSelect' - where: - $ref: '#/components/schemas/FooWhereUniqueInput' - meta: - $ref: '#/components/schemas/_Meta' - FooDeleteManyArgs: - type: object - properties: - where: - $ref: '#/components/schemas/FooWhereInput' - meta: - $ref: '#/components/schemas/_Meta' - FooCountArgs: - type: object - properties: - select: - $ref: '#/components/schemas/FooSelect' - where: - $ref: '#/components/schemas/FooWhereInput' - meta: - $ref: '#/components/schemas/_Meta' - FooAggregateArgs: - type: object - properties: - where: - $ref: '#/components/schemas/FooWhereInput' - orderBy: - $ref: '#/components/schemas/FooOrderByWithRelationInput' - cursor: - $ref: '#/components/schemas/FooWhereUniqueInput' - take: - type: integer - skip: - type: integer - _count: - oneOf: - - type: boolean - - $ref: '#/components/schemas/FooCountAggregateInput' - _min: - $ref: '#/components/schemas/FooMinAggregateInput' - _max: - $ref: '#/components/schemas/FooMaxAggregateInput' - _sum: - $ref: '#/components/schemas/FooSumAggregateInput' - _avg: - $ref: '#/components/schemas/FooAvgAggregateInput' - meta: - $ref: '#/components/schemas/_Meta' - FooGroupByArgs: - type: object - properties: - where: - $ref: '#/components/schemas/FooWhereInput' - orderBy: - $ref: '#/components/schemas/FooOrderByWithRelationInput' - by: - $ref: '#/components/schemas/FooScalarFieldEnum' - having: - $ref: '#/components/schemas/FooScalarWhereWithAggregatesInput' - take: - type: integer - skip: - type: integer - _count: - oneOf: - - type: boolean - - $ref: '#/components/schemas/FooCountAggregateInput' - _min: - $ref: '#/components/schemas/FooMinAggregateInput' - _max: - $ref: '#/components/schemas/FooMaxAggregateInput' - _sum: - $ref: '#/components/schemas/FooSumAggregateInput' - _avg: - $ref: '#/components/schemas/FooAvgAggregateInput' - meta: - $ref: '#/components/schemas/_Meta' -paths: - /foo/create: - post: - operationId: createFoo - description: Create a new Foo - tags: - - foo - security: [] - responses: - '201': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/Foo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FooCreateArgs' - /foo/createMany: - post: - operationId: createManyFoo - description: Create several Foo - tags: - - foo - security: [] - responses: - '201': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/BatchPayload' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FooCreateManyArgs' - /foo/findUnique: - get: - operationId: findUniqueFoo - description: Find one unique Foo - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/Foo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooFindUniqueArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} - /foo/findFirst: - get: - operationId: findFirstFoo - description: Find the first Foo matching the given condition - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/Foo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooFindFirstArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} - /foo/findMany: - get: - operationId: findManyFoo - description: Find a list of Foo - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/Foo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooFindManyArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} - /foo/update: - patch: - operationId: updateFoo - description: Update a Foo - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/Foo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FooUpdateArgs' - /foo/updateMany: - patch: - operationId: updateManyFoo - description: Update Foos matching the given condition - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/BatchPayload' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FooUpdateManyArgs' - /foo/upsert: - post: - operationId: upsertFoo - description: Upsert a Foo - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/Foo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FooUpsertArgs' - /foo/delete: - delete: - operationId: deleteFoo - description: Delete one unique Foo - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/Foo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooDeleteUniqueArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} - /foo/deleteMany: - delete: - operationId: deleteManyFoo - description: Delete Foos matching the given condition - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/BatchPayload' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooDeleteManyArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} - /foo/count: - get: - operationId: countFoo - description: Find a list of Foo - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - oneOf: - - type: integer - - $ref: '#/components/schemas/FooCountAggregateOutputType' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooCountArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} - /foo/aggregate: - get: - operationId: aggregateFoo - description: Aggregate Foos - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/AggregateFoo' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooAggregateArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} - /foo/groupBy: - get: - operationId: groupByFoo - description: Group Foos by fields - tags: - - foo - security: [] - responses: - '200': - description: Successful operation - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - type: array - items: - $ref: '#/components/schemas/FooGroupByOutputType' - description: The Prisma response data serialized with superjson - meta: - $ref: '#/components/schemas/_Meta' - description: The superjson serialization metadata for the "data" field - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Invalid request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is forbidden - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/_Error' - description: Request is unprocessable due to validation errors - parameters: - - name: q - in: query - required: true - description: Superjson-serialized Prisma query object - content: - application/json: - schema: - $ref: '#/components/schemas/FooGroupByArgs' - - name: meta - in: query - description: Superjson serialization metadata for parameter "q" - content: - application/json: - schema: {} + $ref: "#/components/schemas/FooGroupByOutputType" + description: The Prisma response data serialized with superjson + meta: + $ref: "#/components/schemas/_Meta" + description: The superjson serialization metadata for the "data" field + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Invalid request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is forbidden + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/_Error" + description: Request is unprocessable due to validation errors + parameters: + - name: q + in: query + required: true + description: Superjson-serialized Prisma query object + content: + application/json: + schema: + $ref: "#/components/schemas/FooGroupByArgs" + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} diff --git a/packages/plugins/openapi/tests/openapi-rpc.test.ts b/packages/plugins/openapi/tests/openapi-rpc.test.ts index 930341ffb..019c5fcbd 100644 --- a/packages/plugins/openapi/tests/openapi-rpc.test.ts +++ b/packages/plugins/openapi/tests/openapi-rpc.test.ts @@ -377,6 +377,10 @@ plugin openapi { specVersion = '${specVersion}' } +type Meta { + something String +} + model Foo { id String @id @default(cuid()) @@ -388,6 +392,8 @@ model Foo { decimal Decimal boolean Boolean bytes Bytes? + json Meta? @json + plainJson Json @@allow('all', true) } @@ -411,6 +417,94 @@ model Foo { } }); + it('complex TypeDef structures', async () => { + for (const specVersion of ['3.0.0', '3.1.0']) { + const { model, dmmf, modelFile } = await loadZModelAndDmmf(` +plugin openapi { + provider = '${normalizePath(path.resolve(__dirname, '../dist'))}' + specVersion = '${specVersion}' +} + +enum Status { + PENDING + APPROVED + REJECTED +} + +type Address { + street String + city String + country String + zipCode String? +} + +type ContactInfo { + email String + phone String? + addresses Address[] +} + +type ReviewItem { + id String + status Status + reviewer ContactInfo + score Int + comments String[] + metadata Json? +} + +type ComplexData { + reviews ReviewItem[] + primaryContact ContactInfo + tags String[] + settings Json +} + +model Product { + id String @id @default(cuid()) + name String + data ComplexData @json + simpleJson Json + + @@allow('all', true) +} + `); + + const { name: output } = tmp.fileSync({ postfix: '.yaml' }); + + const options = buildOptions(model, modelFile, output); + await generate(model, options, dmmf); + + await OpenAPIParser.validate(output); + + const parsed = YAML.parse(fs.readFileSync(output, 'utf-8')); + expect(parsed.openapi).toBe(specVersion); + + // Verify all TypeDefs are generated + expect(parsed.components.schemas.Address).toBeDefined(); + expect(parsed.components.schemas.ContactInfo).toBeDefined(); + expect(parsed.components.schemas.ReviewItem).toBeDefined(); + expect(parsed.components.schemas.ComplexData).toBeDefined(); + + // Verify enum reference in TypeDef + expect(parsed.components.schemas.ReviewItem.properties.status.$ref).toBe('#/components/schemas/Status'); + + // Verify nested TypeDef references + expect(parsed.components.schemas.ContactInfo.properties.addresses.type).toBe('array'); + expect(parsed.components.schemas.ContactInfo.properties.addresses.items.$ref).toBe('#/components/schemas/Address'); + + // Verify array of complex objects + expect(parsed.components.schemas.ComplexData.properties.reviews.type).toBe('array'); + expect(parsed.components.schemas.ComplexData.properties.reviews.items.$ref).toBe('#/components/schemas/ReviewItem'); + + // Verify the Product model references the ComplexData TypeDef + expect(parsed.components.schemas.Product.properties.data.$ref).toBe('#/components/schemas/ComplexData'); + + // Verify plain Json field remains generic + expect(parsed.components.schemas.Product.properties.simpleJson).toEqual({}); + } + }); + it('full-text search', async () => { const { model, dmmf, modelFile } = await loadZModelAndDmmf(` generator js { From 3d35bbe96789ec7745e0eb757acb1188427930b1 Mon Sep 17 00:00:00 2001 From: loup Date: Sat, 16 Aug 2025 21:57:43 +0200 Subject: [PATCH 2/2] refactor: address code review feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move isTypeDefType variable inside match.with block for Json type - Reuse prismaTypeToOpenAPIType method to avoid duplication - Change Json from { type: 'string', format: 'json' } to empty schema {} - Update test assertion for nullable metadata field These changes improve code quality by reducing duplication and aligning with OpenAPI specification best practices for JSON schema representation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- packages/plugins/openapi/src/rpc-generator.ts | 33 ++++++++----------- .../plugins/openapi/tests/openapi-rpc.test.ts | 13 ++++++++ 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/packages/plugins/openapi/src/rpc-generator.ts b/packages/plugins/openapi/src/rpc-generator.ts index eee17c5ae..8fd5a930d 100644 --- a/packages/plugins/openapi/src/rpc-generator.ts +++ b/packages/plugins/openapi/src/rpc-generator.ts @@ -1,7 +1,7 @@ // Inspired by: https://github.com/omar-dulaimi/prisma-trpc-generator import { PluginError, PluginOptions, analyzePolicies, requireOption, resolvePath } from '@zenstackhq/sdk'; -import { DataModel, Enum, Model, TypeDef, TypeDefField, TypeDefFieldType, isDataModel, isEnum, isTypeDef } from '@zenstackhq/sdk/ast'; +import { DataModel, Model, TypeDef, TypeDefField, TypeDefFieldType, isDataModel, isEnum, isTypeDef } from '@zenstackhq/sdk/ast'; import { AggregateOperationSupport, addMissingInputObjectTypesForAggregate, @@ -865,23 +865,18 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { } private typeDefFieldTypeToOpenAPISchema(type: TypeDefFieldType): OAPI.ReferenceObject | OAPI.SchemaObject { + // For references to other types (TypeDef, Enum, Model) + if (type.reference?.ref) { + return this.ref(type.reference.ref.name, true); + } + + // For scalar types, reuse the existing mapping logic + // Note: Json type is handled as empty schema for consistency return match(type.type) - .with('String', () => ({ type: 'string' } as OAPI.SchemaObject)) - .with(P.union('Int', 'BigInt'), () => ({ type: 'integer' } as OAPI.SchemaObject)) - .with('Float', () => ({ type: 'number' } as OAPI.SchemaObject)) - .with('Decimal', () => this.oneOf({ type: 'string' }, { type: 'number' })) - .with('Boolean', () => ({ type: 'boolean' } as OAPI.SchemaObject)) - .with('DateTime', () => ({ type: 'string', format: 'date-time' } as OAPI.SchemaObject)) - .with('Bytes', () => ({ type: 'string', format: 'byte' } as OAPI.SchemaObject)) - .with('Json', () => ({ type: 'string', format: 'json' } as OAPI.SchemaObject)) - .otherwise(() => { - // It's a reference to another TypeDef, Enum, or Model - const fieldDecl = type.reference?.ref; - if (fieldDecl) { - return this.ref(fieldDecl.name, true); - } - // Fallback for unknown types - return { type: 'string' } as OAPI.SchemaObject; + .with('Json', () => ({} as OAPI.SchemaObject)) + .otherwise((t) => { + // Delegate to prismaTypeToOpenAPIType for all other scalar types + return this.prismaTypeToOpenAPIType(String(t), false); }); } @@ -900,9 +895,6 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { } private prismaTypeToOpenAPIType(type: string, nullable: boolean): OAPI.ReferenceObject | OAPI.SchemaObject { - // Check if this type is a TypeDef - const isTypeDefType = this.model.declarations.some(d => isTypeDef(d) && d.name === type); - const result = match(type) .with('String', () => ({ type: 'string' })) .with(P.union('Int', 'BigInt'), () => ({ type: 'integer' })) @@ -914,6 +906,7 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { .with(P.union('JSON', 'Json'), () => { // For Json fields, check if there's a specific TypeDef reference // Otherwise, return empty schema for arbitrary JSON + const isTypeDefType = this.model.declarations.some(d => isTypeDef(d) && d.name === type); return isTypeDefType ? this.ref(type, false) : {}; }) .otherwise((type) => this.ref(type.toString(), false)); diff --git a/packages/plugins/openapi/tests/openapi-rpc.test.ts b/packages/plugins/openapi/tests/openapi-rpc.test.ts index 019c5fcbd..c61e01b1a 100644 --- a/packages/plugins/openapi/tests/openapi-rpc.test.ts +++ b/packages/plugins/openapi/tests/openapi-rpc.test.ts @@ -489,6 +489,19 @@ model Product { // Verify enum reference in TypeDef expect(parsed.components.schemas.ReviewItem.properties.status.$ref).toBe('#/components/schemas/Status'); + // Json field inside a TypeDef should remain generic (wrapped with nullable since it's optional) + // OpenAPI 3.1 uses oneOf with null type, while 3.0 uses nullable: true + if (specVersion === '3.1.0') { + expect(parsed.components.schemas.ReviewItem.properties.metadata).toEqual({ + oneOf: [ + { type: 'null' }, + {} + ] + }); + } else { + expect(parsed.components.schemas.ReviewItem.properties.metadata).toEqual({ nullable: true }); + } + // Verify nested TypeDef references expect(parsed.components.schemas.ContactInfo.properties.addresses.type).toBe('array'); expect(parsed.components.schemas.ContactInfo.properties.addresses.items.$ref).toBe('#/components/schemas/Address');