diff --git a/packages/plugins/openapi/src/rest-generator.ts b/packages/plugins/openapi/src/rest-generator.ts index 8927198cc..4e7c8bcb0 100644 --- a/packages/plugins/openapi/src/rest-generator.ts +++ b/packages/plugins/openapi/src/rest-generator.ts @@ -7,10 +7,12 @@ import { isForeignKeyField, isIdField, isRelationshipField, + PluginError, + PluginOptions, requireOption, resolvePath, } from '@zenstackhq/sdk'; -import { DataModel, DataModelField, DataModelFieldType, Enum, isDataModel, isEnum } from '@zenstackhq/sdk/ast'; +import { DataModel, DataModelField, DataModelFieldType, Enum, isDataModel, isEnum, Model } from '@zenstackhq/sdk/ast'; import type { DMMF } from '@zenstackhq/sdk/prisma'; import fs from 'fs'; import { lowerCaseFirst } from 'lower-case-first'; @@ -18,7 +20,7 @@ import type { OpenAPIV3_1 as OAPI } from 'openapi-types'; import path from 'path'; import pluralize from 'pluralize'; import invariant from 'tiny-invariant'; -import { P, match } from 'ts-pattern'; +import { match, P } from 'ts-pattern'; import YAML from 'yaml'; import { name } from '.'; import { OpenAPIGeneratorBase } from './generator-base'; @@ -32,6 +34,14 @@ type Policies = ReturnType; export class RESTfulOpenAPIGenerator extends OpenAPIGeneratorBase { private warnings: string[] = []; + constructor(protected model: Model, protected options: PluginOptions, protected dmmf: DMMF.Document) { + super(model, options, dmmf); + + if (this.options.omitInputDetails !== undefined) { + throw new PluginError(name, '"omitInputDetails" option is not supported for "rest" flavor'); + } + } + generate() { let output = requireOption(this.options, 'output', name); output = resolvePath(output, this.options); diff --git a/packages/plugins/openapi/src/rpc-generator.ts b/packages/plugins/openapi/src/rpc-generator.ts index c524d9cd1..edd4bc9a6 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, analyzePolicies, requireOption, resolvePath } from '@zenstackhq/sdk'; -import { DataModel, isDataModel } from '@zenstackhq/sdk/ast'; +import { PluginError, PluginOptions, analyzePolicies, requireOption, resolvePath } from '@zenstackhq/sdk'; +import { DataModel, Model, isDataModel } from '@zenstackhq/sdk/ast'; import { AggregateOperationSupport, addMissingInputObjectTypesForAggregate, @@ -23,6 +23,8 @@ import { name } from '.'; import { OpenAPIGeneratorBase } from './generator-base'; import { getModelResourceMeta } from './meta'; +const ANY_OBJECT = '_AnyObject'; + /** * Generates OpenAPI specification. */ @@ -32,6 +34,16 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { private usedComponents: Set = new Set(); private aggregateOperationSupport: AggregateOperationSupport; private warnings: string[] = []; + private omitInputDetails: boolean; + + constructor(protected model: Model, protected options: PluginOptions, protected dmmf: DMMF.Document) { + super(model, options, dmmf); + + this.omitInputDetails = this.getOption('omitInputDetails', false); + if (this.omitInputDetails !== undefined && typeof this.omitInputDetails !== 'boolean') { + throw new PluginError(name, `Invalid option value for "omitInputDetails", boolean expected`); + } + } generate() { let output = requireOption(this.options, 'output', name); @@ -151,9 +163,9 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { type: 'object', required: ['data'], properties: { - select: this.ref(`${modelName}Select`), - include: hasRelation ? this.ref(`${modelName}Include`) : undefined, - data: this.ref(`${modelName}CreateInput`), + select: this.omittableRef(`${modelName}Select`), + include: hasRelation ? this.omittableRef(`${modelName}Include`) : undefined, + data: this.omittableRef(`${modelName}CreateInput`), meta: this.ref('_Meta'), }, }, @@ -177,8 +189,8 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { required: ['data'], properties: { data: this.oneOf( - this.ref(`${modelName}CreateManyInput`), - this.array(this.ref(`${modelName}CreateManyInput`)) + this.omittableRef(`${modelName}CreateManyInput`), + this.array(this.omittableRef(`${modelName}CreateManyInput`)) ), skipDuplicates: { type: 'boolean', @@ -207,9 +219,9 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { type: 'object', required: ['where'], properties: { - select: this.ref(`${modelName}Select`), - include: hasRelation ? this.ref(`${modelName}Include`) : undefined, - where: this.ref(`${modelName}WhereUniqueInput`), + select: this.omittableRef(`${modelName}Select`), + include: hasRelation ? this.omittableRef(`${modelName}Include`) : undefined, + where: this.omittableRef(`${modelName}WhereUniqueInput`), meta: this.ref('_Meta'), }, }, @@ -230,9 +242,9 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { { type: 'object', properties: { - select: this.ref(`${modelName}Select`), - include: hasRelation ? this.ref(`${modelName}Include`) : undefined, - where: this.ref(`${modelName}WhereInput`), + select: this.omittableRef(`${modelName}Select`), + include: hasRelation ? this.omittableRef(`${modelName}Include`) : undefined, + where: this.omittableRef(`${modelName}WhereInput`), meta: this.ref('_Meta'), }, }, @@ -253,9 +265,9 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { { type: 'object', properties: { - select: this.ref(`${modelName}Select`), - include: hasRelation ? this.ref(`${modelName}Include`) : undefined, - where: this.ref(`${modelName}WhereInput`), + select: this.omittableRef(`${modelName}Select`), + include: hasRelation ? this.omittableRef(`${modelName}Include`) : undefined, + where: this.omittableRef(`${modelName}WhereInput`), meta: this.ref('_Meta'), }, }, @@ -277,10 +289,10 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { type: 'object', required: ['where', 'data'], properties: { - select: this.ref(`${modelName}Select`), - include: hasRelation ? this.ref(`${modelName}Include`) : undefined, - where: this.ref(`${modelName}WhereUniqueInput`), - data: this.ref(`${modelName}UpdateInput`), + select: this.omittableRef(`${modelName}Select`), + include: hasRelation ? this.omittableRef(`${modelName}Include`) : undefined, + where: this.omittableRef(`${modelName}WhereUniqueInput`), + data: this.omittableRef(`${modelName}UpdateInput`), meta: this.ref('_Meta'), }, }, @@ -302,8 +314,8 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { type: 'object', required: ['data'], properties: { - where: this.ref(`${modelName}WhereInput`), - data: this.ref(`${modelName}UpdateManyMutationInput`), + where: this.omittableRef(`${modelName}WhereInput`), + data: this.omittableRef(`${modelName}UpdateManyMutationInput`), meta: this.ref('_Meta'), }, }, @@ -325,11 +337,11 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { type: 'object', required: ['create', 'update', 'where'], properties: { - select: this.ref(`${modelName}Select`), - include: hasRelation ? this.ref(`${modelName}Include`) : undefined, - where: this.ref(`${modelName}WhereUniqueInput`), - create: this.ref(`${modelName}CreateInput`), - update: this.ref(`${modelName}UpdateInput`), + select: this.omittableRef(`${modelName}Select`), + include: hasRelation ? this.omittableRef(`${modelName}Include`) : undefined, + where: this.omittableRef(`${modelName}WhereUniqueInput`), + create: this.omittableRef(`${modelName}CreateInput`), + update: this.omittableRef(`${modelName}UpdateInput`), meta: this.ref('_Meta'), }, }, @@ -351,9 +363,9 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { type: 'object', required: ['where'], properties: { - select: this.ref(`${modelName}Select`), - include: hasRelation ? this.ref(`${modelName}Include`) : undefined, - where: this.ref(`${modelName}WhereUniqueInput`), + select: this.omittableRef(`${modelName}Select`), + include: hasRelation ? this.omittableRef(`${modelName}Include`) : undefined, + where: this.omittableRef(`${modelName}WhereUniqueInput`), meta: this.ref('_Meta'), }, }, @@ -374,7 +386,7 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { { type: 'object', properties: { - where: this.ref(`${modelName}WhereInput`), + where: this.omittableRef(`${modelName}WhereInput`), meta: this.ref('_Meta'), }, }, @@ -395,8 +407,8 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { { type: 'object', properties: { - select: this.ref(`${modelName}Select`), - where: this.ref(`${modelName}WhereInput`), + select: this.omittableRef(`${modelName}Select`), + where: this.omittableRef(`${modelName}WhereInput`), meta: this.ref('_Meta'), }, }, @@ -425,9 +437,9 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { { type: 'object', properties: { - where: this.ref(`${modelName}WhereInput`), - orderBy: this.ref(orderByWithRelationInput), - cursor: this.ref(`${modelName}WhereUniqueInput`), + where: this.omittableRef(`${modelName}WhereInput`), + orderBy: this.omittableRef(orderByWithRelationInput), + cursor: this.omittableRef(`${modelName}WhereUniqueInput`), take: { type: 'integer' }, skip: { type: 'integer' }, ...this.aggregateFields(model), @@ -451,10 +463,10 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { { type: 'object', properties: { - where: this.ref(`${modelName}WhereInput`), - orderBy: this.ref(orderByWithRelationInput), - by: this.ref(`${modelName}ScalarFieldEnum`), - having: this.ref(`${modelName}ScalarWhereWithAggregatesInput`), + where: this.omittableRef(`${modelName}WhereInput`), + orderBy: this.omittableRef(orderByWithRelationInput), + by: this.omittableRef(`${modelName}ScalarFieldEnum`), + having: this.omittableRef(`${modelName}ScalarWhereWithAggregatesInput`), take: { type: 'integer' }, skip: { type: 'integer' }, ...this.aggregateFields(model), @@ -587,19 +599,19 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { const modelName = upperCaseFirst(model.name); if (supportedOps) { if (supportedOps.count) { - result._count = this.oneOf({ type: 'boolean' }, this.ref(`${modelName}CountAggregateInput`)); + result._count = this.oneOf({ type: 'boolean' }, this.omittableRef(`${modelName}CountAggregateInput`)); } if (supportedOps.min) { - result._min = this.ref(`${modelName}MinAggregateInput`); + result._min = this.omittableRef(`${modelName}MinAggregateInput`); } if (supportedOps.max) { - result._max = this.ref(`${modelName}MaxAggregateInput`); + result._max = this.omittableRef(`${modelName}MaxAggregateInput`); } if (supportedOps.sum) { - result._sum = this.ref(`${modelName}SumAggregateInput`); + result._sum = this.omittableRef(`${modelName}SumAggregateInput`); } if (supportedOps.avg) { - result._avg = this.ref(`${modelName}AvgAggregateInput`); + result._avg = this.omittableRef(`${modelName}AvgAggregateInput`); } } return result; @@ -617,6 +629,14 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { schemas, }; + if (this.omitInputDetails) { + // generate a catch-all object type + schemas[ANY_OBJECT] = { + type: 'object', + additionalProperties: true, + }; + } + // user-defined and built-in enums for (const _enum of [...(this.dmmf.schema.enumTypes.model ?? []), ...this.dmmf.schema.enumTypes.prisma]) { schemas[upperCaseFirst(_enum.name)] = this.generateEnumComponent(_enum); @@ -824,6 +844,14 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase { return { $ref: `#/components/schemas/${upperCaseFirst(type)}`, description }; } + private omittableRef(type: string, rooted = true, description?: string): OAPI.ReferenceObject { + if (this.omitInputDetails) { + return this.ref(ANY_OBJECT); + } else { + return this.ref(type, rooted, description); + } + } + private response(schema: OAPI.SchemaObject): OAPI.SchemaObject { return { type: 'object', diff --git a/packages/plugins/openapi/tests/baseline/rpc-3.0.0-omit.baseline.yaml b/packages/plugins/openapi/tests/baseline/rpc-3.0.0-omit.baseline.yaml new file mode 100644 index 000000000..dd683e9e3 --- /dev/null +++ b/packages/plugins/openapi/tests/baseline/rpc-3.0.0-omit.baseline.yaml @@ -0,0 +1,2996 @@ +openapi: 3.0.0 +info: + title: ZenStack Generated API + version: 1.0.0 +tags: + - name: user + description: User operations + - name: profile + description: Profile operations + - name: post_Item + description: Post-related operations +components: + schemas: + _AnyObject: + type: object + additionalProperties: true + Role: + type: string + enum: + - USER + - ADMIN + User: + type: object + properties: + id: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + email: + type: string + role: + $ref: '#/components/schemas/Role' + posts: + type: array + items: + $ref: '#/components/schemas/Post_Item' + profile: + allOf: + - $ref: '#/components/schemas/Profile' + nullable: true + required: + - id + - createdAt + - updatedAt + - email + - role + Profile: + type: object + properties: + id: + type: string + image: + type: string + nullable: true + user: + $ref: '#/components/schemas/User' + userId: + type: string + required: + - id + - user + - userId + Post_Item: + type: object + properties: + id: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + title: + type: string + author: + allOf: + - $ref: '#/components/schemas/User' + nullable: true + authorId: + type: string + nullable: true + published: + type: boolean + viewCount: + type: integer + notes: + type: string + nullable: true + required: + - id + - createdAt + - updatedAt + - title + - published + - viewCount + AggregateUser: + type: object + properties: + _count: + allOf: + - $ref: '#/components/schemas/UserCountAggregateOutputType' + nullable: true + _min: + allOf: + - $ref: '#/components/schemas/UserMinAggregateOutputType' + nullable: true + _max: + allOf: + - $ref: '#/components/schemas/UserMaxAggregateOutputType' + nullable: true + UserGroupByOutputType: + type: object + properties: + id: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + email: + type: string + role: + $ref: '#/components/schemas/Role' + _count: + allOf: + - $ref: '#/components/schemas/UserCountAggregateOutputType' + nullable: true + _min: + allOf: + - $ref: '#/components/schemas/UserMinAggregateOutputType' + nullable: true + _max: + allOf: + - $ref: '#/components/schemas/UserMaxAggregateOutputType' + nullable: true + required: + - id + - createdAt + - updatedAt + - email + - role + AggregateProfile: + type: object + properties: + _count: + allOf: + - $ref: '#/components/schemas/ProfileCountAggregateOutputType' + nullable: true + _min: + allOf: + - $ref: '#/components/schemas/ProfileMinAggregateOutputType' + nullable: true + _max: + allOf: + - $ref: '#/components/schemas/ProfileMaxAggregateOutputType' + nullable: true + ProfileGroupByOutputType: + type: object + properties: + id: + type: string + image: + type: string + nullable: true + userId: + type: string + _count: + allOf: + - $ref: '#/components/schemas/ProfileCountAggregateOutputType' + nullable: true + _min: + allOf: + - $ref: '#/components/schemas/ProfileMinAggregateOutputType' + nullable: true + _max: + allOf: + - $ref: '#/components/schemas/ProfileMaxAggregateOutputType' + nullable: true + required: + - id + - userId + AggregatePost_Item: + type: object + properties: + _count: + allOf: + - $ref: '#/components/schemas/Post_ItemCountAggregateOutputType' + nullable: true + _avg: + allOf: + - $ref: '#/components/schemas/Post_ItemAvgAggregateOutputType' + nullable: true + _sum: + allOf: + - $ref: '#/components/schemas/Post_ItemSumAggregateOutputType' + nullable: true + _min: + allOf: + - $ref: '#/components/schemas/Post_ItemMinAggregateOutputType' + nullable: true + _max: + allOf: + - $ref: '#/components/schemas/Post_ItemMaxAggregateOutputType' + nullable: true + Post_ItemGroupByOutputType: + type: object + properties: + id: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + title: + type: string + authorId: + type: string + nullable: true + published: + type: boolean + viewCount: + type: integer + notes: + type: string + nullable: true + _count: + allOf: + - $ref: '#/components/schemas/Post_ItemCountAggregateOutputType' + nullable: true + _avg: + allOf: + - $ref: '#/components/schemas/Post_ItemAvgAggregateOutputType' + nullable: true + _sum: + allOf: + - $ref: '#/components/schemas/Post_ItemSumAggregateOutputType' + nullable: true + _min: + allOf: + - $ref: '#/components/schemas/Post_ItemMinAggregateOutputType' + nullable: true + _max: + allOf: + - $ref: '#/components/schemas/Post_ItemMaxAggregateOutputType' + nullable: true + required: + - id + - createdAt + - updatedAt + - title + - published + - viewCount + UserCountAggregateOutputType: + type: object + properties: + id: + type: integer + createdAt: + type: integer + updatedAt: + type: integer + email: + type: integer + role: + type: integer + _all: + type: integer + required: + - id + - createdAt + - updatedAt + - email + - role + - _all + UserMinAggregateOutputType: + type: object + properties: + id: + type: string + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + email: + type: string + nullable: true + role: + allOf: + - $ref: '#/components/schemas/Role' + nullable: true + UserMaxAggregateOutputType: + type: object + properties: + id: + type: string + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + email: + type: string + nullable: true + role: + allOf: + - $ref: '#/components/schemas/Role' + nullable: true + ProfileCountAggregateOutputType: + type: object + properties: + id: + type: integer + image: + type: integer + userId: + type: integer + _all: + type: integer + required: + - id + - image + - userId + - _all + ProfileMinAggregateOutputType: + type: object + properties: + id: + type: string + nullable: true + image: + type: string + nullable: true + userId: + type: string + nullable: true + ProfileMaxAggregateOutputType: + type: object + properties: + id: + type: string + nullable: true + image: + type: string + nullable: true + userId: + type: string + nullable: true + Post_ItemCountAggregateOutputType: + type: object + properties: + id: + type: integer + createdAt: + type: integer + updatedAt: + type: integer + title: + type: integer + authorId: + type: integer + published: + type: integer + viewCount: + type: integer + notes: + type: integer + _all: + type: integer + required: + - id + - createdAt + - updatedAt + - title + - authorId + - published + - viewCount + - notes + - _all + Post_ItemAvgAggregateOutputType: + type: object + properties: + viewCount: + type: number + nullable: true + Post_ItemSumAggregateOutputType: + type: object + properties: + viewCount: + type: integer + nullable: true + Post_ItemMinAggregateOutputType: + type: object + properties: + id: + type: string + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + title: + type: string + nullable: true + authorId: + type: string + nullable: true + published: + type: boolean + nullable: true + viewCount: + type: integer + nullable: true + notes: + type: string + nullable: true + Post_ItemMaxAggregateOutputType: + type: object + properties: + id: + type: string + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + title: + type: string + nullable: true + authorId: + type: string + nullable: true + published: + type: boolean + nullable: true + viewCount: + type: integer + nullable: true + notes: + type: string + 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 + UserCreateArgs: + type: object + required: + - data + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserCreateManyArgs: + type: object + required: + - data + properties: + data: + oneOf: + - $ref: '#/components/schemas/_AnyObject' + - type: array + items: + $ref: '#/components/schemas/_AnyObject' + skipDuplicates: + type: boolean + description: Do not insert records with unique fields or ID fields that already + exist. + meta: + $ref: '#/components/schemas/_Meta' + UserFindUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserFindFirstArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserFindManyArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserUpdateArgs: + type: object + required: + - where + - data + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserUpdateManyArgs: + type: object + required: + - data + properties: + where: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserUpsertArgs: + type: object + required: + - create + - update + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + create: + $ref: '#/components/schemas/_AnyObject' + update: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserDeleteUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserDeleteManyArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserCountArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserAggregateArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + orderBy: + $ref: '#/components/schemas/_AnyObject' + cursor: + $ref: '#/components/schemas/_AnyObject' + take: + type: integer + skip: + type: integer + _count: + oneOf: + - type: boolean + - $ref: '#/components/schemas/_AnyObject' + _min: + $ref: '#/components/schemas/_AnyObject' + _max: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserGroupByArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + orderBy: + $ref: '#/components/schemas/_AnyObject' + by: + $ref: '#/components/schemas/_AnyObject' + having: + $ref: '#/components/schemas/_AnyObject' + take: + type: integer + skip: + type: integer + _count: + oneOf: + - type: boolean + - $ref: '#/components/schemas/_AnyObject' + _min: + $ref: '#/components/schemas/_AnyObject' + _max: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileCreateArgs: + type: object + required: + - data + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileCreateManyArgs: + type: object + required: + - data + properties: + data: + oneOf: + - $ref: '#/components/schemas/_AnyObject' + - type: array + items: + $ref: '#/components/schemas/_AnyObject' + skipDuplicates: + type: boolean + description: Do not insert records with unique fields or ID fields that already + exist. + meta: + $ref: '#/components/schemas/_Meta' + ProfileFindUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileFindFirstArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileFindManyArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileUpdateArgs: + type: object + required: + - where + - data + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileUpdateManyArgs: + type: object + required: + - data + properties: + where: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileUpsertArgs: + type: object + required: + - create + - update + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + create: + $ref: '#/components/schemas/_AnyObject' + update: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileDeleteUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileDeleteManyArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileCountArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileAggregateArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + orderBy: + $ref: '#/components/schemas/_AnyObject' + cursor: + $ref: '#/components/schemas/_AnyObject' + take: + type: integer + skip: + type: integer + _count: + oneOf: + - type: boolean + - $ref: '#/components/schemas/_AnyObject' + _min: + $ref: '#/components/schemas/_AnyObject' + _max: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileGroupByArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + orderBy: + $ref: '#/components/schemas/_AnyObject' + by: + $ref: '#/components/schemas/_AnyObject' + having: + $ref: '#/components/schemas/_AnyObject' + take: + type: integer + skip: + type: integer + _count: + oneOf: + - type: boolean + - $ref: '#/components/schemas/_AnyObject' + _min: + $ref: '#/components/schemas/_AnyObject' + _max: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemCreateArgs: + type: object + required: + - data + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemCreateManyArgs: + type: object + required: + - data + properties: + data: + oneOf: + - $ref: '#/components/schemas/_AnyObject' + - type: array + items: + $ref: '#/components/schemas/_AnyObject' + skipDuplicates: + type: boolean + description: Do not insert records with unique fields or ID fields that already + exist. + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemFindUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemFindFirstArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemUpdateArgs: + type: object + required: + - where + - data + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemUpdateManyArgs: + type: object + required: + - data + properties: + where: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemUpsertArgs: + type: object + required: + - create + - update + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + create: + $ref: '#/components/schemas/_AnyObject' + update: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemDeleteUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemDeleteManyArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemCountArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemAggregateArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + orderBy: + $ref: '#/components/schemas/_AnyObject' + cursor: + $ref: '#/components/schemas/_AnyObject' + take: + type: integer + skip: + type: integer + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemGroupByArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + orderBy: + $ref: '#/components/schemas/_AnyObject' + by: + $ref: '#/components/schemas/_AnyObject' + having: + $ref: '#/components/schemas/_AnyObject' + take: + type: integer + skip: + type: integer + meta: + $ref: '#/components/schemas/_Meta' +paths: + /user/create: + post: + operationId: createUser + description: Create a new User + tags: + - user + responses: + '201': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/User' + 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/UserCreateArgs' + /user/createMany: + post: + operationId: createManyUser + description: Create several User + tags: + - user + 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/UserCreateManyArgs' + /user/findUnique: + get: + operationId: findUniqueUser + description: Find one unique User + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/User' + 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/UserFindUniqueArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /user/findFirst: + get: + operationId: findFirstUser + description: Find the first User matching the given condition + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/User' + 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/UserFindFirstArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /user/findMany: + get: + operationId: findManyUser + description: Find users matching the given conditions + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/User' + 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/UserFindManyArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /user/update: + patch: + operationId: updateUser + description: Update a User + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/User' + 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/UserUpdateArgs' + /user/updateMany: + patch: + operationId: updateManyUser + description: Update Users matching the given condition + tags: + - user + 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/UserUpdateManyArgs' + /user/upsert: + post: + operationId: upsertUser + description: Upsert a User + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/User' + 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/UserUpsertArgs' + /user/dodelete: + put: + operationId: deleteUser + description: Delete a unique user + tags: + - delete + - user + summary: Delete a user yeah yeah + deprecated: true + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/User' + 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/UserDeleteUniqueArgs' + /user/deleteMany: + delete: + operationId: deleteManyUser + description: Delete Users matching the given condition + tags: + - user + 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/UserDeleteManyArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /user/count: + get: + operationId: countUser + description: Find a list of User + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + oneOf: + - type: integer + - $ref: '#/components/schemas/UserCountAggregateOutputType' + 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/UserCountArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /user/aggregate: + get: + operationId: aggregateUser + description: Aggregate Users + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/AggregateUser' + 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/UserAggregateArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /user/groupBy: + get: + operationId: groupByUser + description: Group Users by fields + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/UserGroupByOutputType' + 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/UserGroupByArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/create: + post: + operationId: createProfile + description: Create a new Profile + tags: + - profile + responses: + '201': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Profile' + 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/ProfileCreateArgs' + /profile/createMany: + post: + operationId: createManyProfile + description: Create several Profile + tags: + - profile + 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/ProfileCreateManyArgs' + /profile/findUnique: + get: + operationId: findUniqueProfile + description: Find one unique Profile + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Profile' + 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/ProfileFindUniqueArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/findFirst: + get: + operationId: findFirstProfile + description: Find the first Profile matching the given condition + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Profile' + 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/ProfileFindFirstArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/findMany: + get: + operationId: findManyProfile + description: Find a list of Profile + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/Profile' + 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/ProfileFindManyArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/update: + patch: + operationId: updateProfile + description: Update a Profile + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Profile' + 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/ProfileUpdateArgs' + /profile/updateMany: + patch: + operationId: updateManyProfile + description: Update Profiles matching the given condition + tags: + - profile + 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/ProfileUpdateManyArgs' + /profile/upsert: + post: + operationId: upsertProfile + description: Upsert a Profile + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Profile' + 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/ProfileUpsertArgs' + /profile/delete: + delete: + operationId: deleteProfile + description: Delete one unique Profile + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Profile' + 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/ProfileDeleteUniqueArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/deleteMany: + delete: + operationId: deleteManyProfile + description: Delete Profiles matching the given condition + tags: + - profile + 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/ProfileDeleteManyArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/count: + get: + operationId: countProfile + description: Find a list of Profile + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + oneOf: + - type: integer + - $ref: '#/components/schemas/ProfileCountAggregateOutputType' + 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/ProfileCountArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/aggregate: + get: + operationId: aggregateProfile + description: Aggregate Profiles + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/AggregateProfile' + 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/ProfileAggregateArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/groupBy: + get: + operationId: groupByProfile + description: Group Profiles by fields + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/ProfileGroupByOutputType' + 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/ProfileGroupByArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /post_Item/create: + post: + operationId: createPost_Item + description: Create a new Post_Item + tags: + - post_Item + responses: + '201': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Post_Item' + 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/Post_ItemCreateArgs' + /post_Item/createMany: + post: + operationId: createManyPost_Item + description: Create several Post_Item + tags: + - post_Item + 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/Post_ItemCreateManyArgs' + /post_Item/findUnique: + get: + operationId: findUniquePost_Item + description: Find one unique Post_Item + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Post_Item' + 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/Post_ItemFindUniqueArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /post_Item/findFirst: + get: + operationId: findFirstPost_Item + description: Find the first Post_Item matching the given condition + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Post_Item' + 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/Post_ItemFindFirstArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /post_Item/update: + patch: + operationId: updatePost_Item + description: Update a Post_Item + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Post_Item' + 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/Post_ItemUpdateArgs' + /post_Item/updateMany: + patch: + operationId: updateManyPost_Item + description: Update Post_Items matching the given condition + tags: + - post_Item + 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/Post_ItemUpdateManyArgs' + /post_Item/upsert: + post: + operationId: upsertPost_Item + description: Upsert a Post_Item + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Post_Item' + 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/Post_ItemUpsertArgs' + /post_Item/delete: + delete: + operationId: deletePost_Item + description: Delete one unique Post_Item + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Post_Item' + 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/Post_ItemDeleteUniqueArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /post_Item/deleteMany: + delete: + operationId: deleteManyPost_Item + description: Delete Post_Items matching the given condition + tags: + - post_Item + 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/Post_ItemDeleteManyArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /post_Item/count: + get: + operationId: countPost_Item + description: Find a list of Post_Item + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + oneOf: + - type: integer + - $ref: '#/components/schemas/Post_ItemCountAggregateOutputType' + 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/Post_ItemCountArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /post_Item/aggregate: + get: + operationId: aggregatePost_Item + description: Aggregate Post_Items + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/AggregatePost_Item' + 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/Post_ItemAggregateArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /post_Item/groupBy: + get: + operationId: groupByPost_Item + description: Group Post_Items by fields + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/Post_ItemGroupByOutputType' + 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/Post_ItemGroupByArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} diff --git a/packages/plugins/openapi/tests/baseline/rpc-3.1.0-omit.baseline.yaml b/packages/plugins/openapi/tests/baseline/rpc-3.1.0-omit.baseline.yaml new file mode 100644 index 000000000..fae21b204 --- /dev/null +++ b/packages/plugins/openapi/tests/baseline/rpc-3.1.0-omit.baseline.yaml @@ -0,0 +1,3034 @@ +openapi: 3.1.0 +info: + title: ZenStack Generated API + version: 1.0.0 +tags: + - name: user + description: User operations + - name: profile + description: Profile operations + - name: post_Item + description: Post-related operations +components: + schemas: + _AnyObject: + type: object + additionalProperties: true + Role: + type: string + enum: + - USER + - ADMIN + User: + type: object + properties: + id: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + email: + type: string + role: + $ref: '#/components/schemas/Role' + posts: + type: array + items: + $ref: '#/components/schemas/Post_Item' + profile: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Profile' + required: + - id + - createdAt + - updatedAt + - email + - role + Profile: + type: object + properties: + id: + type: string + image: + oneOf: + - type: 'null' + - type: string + user: + $ref: '#/components/schemas/User' + userId: + type: string + required: + - id + - user + - userId + Post_Item: + type: object + properties: + id: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + title: + type: string + author: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/User' + authorId: + oneOf: + - type: 'null' + - type: string + published: + type: boolean + viewCount: + type: integer + notes: + oneOf: + - type: 'null' + - type: string + required: + - id + - createdAt + - updatedAt + - title + - published + - viewCount + AggregateUser: + type: object + properties: + _count: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/UserCountAggregateOutputType' + _min: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/UserMinAggregateOutputType' + _max: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/UserMaxAggregateOutputType' + UserGroupByOutputType: + type: object + properties: + id: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + email: + type: string + role: + $ref: '#/components/schemas/Role' + _count: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/UserCountAggregateOutputType' + _min: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/UserMinAggregateOutputType' + _max: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/UserMaxAggregateOutputType' + required: + - id + - createdAt + - updatedAt + - email + - role + AggregateProfile: + type: object + properties: + _count: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/ProfileCountAggregateOutputType' + _min: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/ProfileMinAggregateOutputType' + _max: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/ProfileMaxAggregateOutputType' + ProfileGroupByOutputType: + type: object + properties: + id: + type: string + image: + oneOf: + - type: 'null' + - type: string + userId: + type: string + _count: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/ProfileCountAggregateOutputType' + _min: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/ProfileMinAggregateOutputType' + _max: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/ProfileMaxAggregateOutputType' + required: + - id + - userId + AggregatePost_Item: + type: object + properties: + _count: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Post_ItemCountAggregateOutputType' + _avg: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Post_ItemAvgAggregateOutputType' + _sum: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Post_ItemSumAggregateOutputType' + _min: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Post_ItemMinAggregateOutputType' + _max: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Post_ItemMaxAggregateOutputType' + Post_ItemGroupByOutputType: + type: object + properties: + id: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + title: + type: string + authorId: + oneOf: + - type: 'null' + - type: string + published: + type: boolean + viewCount: + type: integer + notes: + oneOf: + - type: 'null' + - type: string + _count: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Post_ItemCountAggregateOutputType' + _avg: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Post_ItemAvgAggregateOutputType' + _sum: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Post_ItemSumAggregateOutputType' + _min: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Post_ItemMinAggregateOutputType' + _max: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Post_ItemMaxAggregateOutputType' + required: + - id + - createdAt + - updatedAt + - title + - published + - viewCount + UserCountAggregateOutputType: + type: object + properties: + id: + type: integer + createdAt: + type: integer + updatedAt: + type: integer + email: + type: integer + role: + type: integer + _all: + type: integer + required: + - id + - createdAt + - updatedAt + - email + - role + - _all + UserMinAggregateOutputType: + type: object + properties: + id: + oneOf: + - type: 'null' + - type: string + createdAt: + oneOf: + - type: 'null' + - type: string + format: date-time + updatedAt: + oneOf: + - type: 'null' + - type: string + format: date-time + email: + oneOf: + - type: 'null' + - type: string + role: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Role' + UserMaxAggregateOutputType: + type: object + properties: + id: + oneOf: + - type: 'null' + - type: string + createdAt: + oneOf: + - type: 'null' + - type: string + format: date-time + updatedAt: + oneOf: + - type: 'null' + - type: string + format: date-time + email: + oneOf: + - type: 'null' + - type: string + role: + oneOf: + - type: 'null' + - $ref: '#/components/schemas/Role' + ProfileCountAggregateOutputType: + type: object + properties: + id: + type: integer + image: + type: integer + userId: + type: integer + _all: + type: integer + required: + - id + - image + - userId + - _all + ProfileMinAggregateOutputType: + type: object + properties: + id: + oneOf: + - type: 'null' + - type: string + image: + oneOf: + - type: 'null' + - type: string + userId: + oneOf: + - type: 'null' + - type: string + ProfileMaxAggregateOutputType: + type: object + properties: + id: + oneOf: + - type: 'null' + - type: string + image: + oneOf: + - type: 'null' + - type: string + userId: + oneOf: + - type: 'null' + - type: string + Post_ItemCountAggregateOutputType: + type: object + properties: + id: + type: integer + createdAt: + type: integer + updatedAt: + type: integer + title: + type: integer + authorId: + type: integer + published: + type: integer + viewCount: + type: integer + notes: + type: integer + _all: + type: integer + required: + - id + - createdAt + - updatedAt + - title + - authorId + - published + - viewCount + - notes + - _all + Post_ItemAvgAggregateOutputType: + type: object + properties: + viewCount: + oneOf: + - type: 'null' + - type: number + Post_ItemSumAggregateOutputType: + type: object + properties: + viewCount: + oneOf: + - type: 'null' + - type: integer + Post_ItemMinAggregateOutputType: + type: object + properties: + id: + oneOf: + - type: 'null' + - type: string + createdAt: + oneOf: + - type: 'null' + - type: string + format: date-time + updatedAt: + oneOf: + - type: 'null' + - type: string + format: date-time + title: + oneOf: + - type: 'null' + - type: string + authorId: + oneOf: + - type: 'null' + - type: string + published: + oneOf: + - type: 'null' + - type: boolean + viewCount: + oneOf: + - type: 'null' + - type: integer + notes: + oneOf: + - type: 'null' + - type: string + Post_ItemMaxAggregateOutputType: + type: object + properties: + id: + oneOf: + - type: 'null' + - type: string + createdAt: + oneOf: + - type: 'null' + - type: string + format: date-time + updatedAt: + oneOf: + - type: 'null' + - type: string + format: date-time + title: + oneOf: + - type: 'null' + - type: string + authorId: + oneOf: + - type: 'null' + - type: string + published: + oneOf: + - type: 'null' + - type: boolean + viewCount: + oneOf: + - type: 'null' + - type: integer + notes: + oneOf: + - type: 'null' + - type: string + _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 + UserCreateArgs: + type: object + required: + - data + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserCreateManyArgs: + type: object + required: + - data + properties: + data: + oneOf: + - $ref: '#/components/schemas/_AnyObject' + - type: array + items: + $ref: '#/components/schemas/_AnyObject' + skipDuplicates: + type: boolean + description: Do not insert records with unique fields or ID fields that already + exist. + meta: + $ref: '#/components/schemas/_Meta' + UserFindUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserFindFirstArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserFindManyArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserUpdateArgs: + type: object + required: + - where + - data + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserUpdateManyArgs: + type: object + required: + - data + properties: + where: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserUpsertArgs: + type: object + required: + - create + - update + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + create: + $ref: '#/components/schemas/_AnyObject' + update: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserDeleteUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserDeleteManyArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserCountArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserAggregateArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + orderBy: + $ref: '#/components/schemas/_AnyObject' + cursor: + $ref: '#/components/schemas/_AnyObject' + take: + type: integer + skip: + type: integer + _count: + oneOf: + - type: boolean + - $ref: '#/components/schemas/_AnyObject' + _min: + $ref: '#/components/schemas/_AnyObject' + _max: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + UserGroupByArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + orderBy: + $ref: '#/components/schemas/_AnyObject' + by: + $ref: '#/components/schemas/_AnyObject' + having: + $ref: '#/components/schemas/_AnyObject' + take: + type: integer + skip: + type: integer + _count: + oneOf: + - type: boolean + - $ref: '#/components/schemas/_AnyObject' + _min: + $ref: '#/components/schemas/_AnyObject' + _max: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileCreateArgs: + type: object + required: + - data + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileCreateManyArgs: + type: object + required: + - data + properties: + data: + oneOf: + - $ref: '#/components/schemas/_AnyObject' + - type: array + items: + $ref: '#/components/schemas/_AnyObject' + skipDuplicates: + type: boolean + description: Do not insert records with unique fields or ID fields that already + exist. + meta: + $ref: '#/components/schemas/_Meta' + ProfileFindUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileFindFirstArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileFindManyArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileUpdateArgs: + type: object + required: + - where + - data + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileUpdateManyArgs: + type: object + required: + - data + properties: + where: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileUpsertArgs: + type: object + required: + - create + - update + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + create: + $ref: '#/components/schemas/_AnyObject' + update: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileDeleteUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileDeleteManyArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileCountArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileAggregateArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + orderBy: + $ref: '#/components/schemas/_AnyObject' + cursor: + $ref: '#/components/schemas/_AnyObject' + take: + type: integer + skip: + type: integer + _count: + oneOf: + - type: boolean + - $ref: '#/components/schemas/_AnyObject' + _min: + $ref: '#/components/schemas/_AnyObject' + _max: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + ProfileGroupByArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + orderBy: + $ref: '#/components/schemas/_AnyObject' + by: + $ref: '#/components/schemas/_AnyObject' + having: + $ref: '#/components/schemas/_AnyObject' + take: + type: integer + skip: + type: integer + _count: + oneOf: + - type: boolean + - $ref: '#/components/schemas/_AnyObject' + _min: + $ref: '#/components/schemas/_AnyObject' + _max: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemCreateArgs: + type: object + required: + - data + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemCreateManyArgs: + type: object + required: + - data + properties: + data: + oneOf: + - $ref: '#/components/schemas/_AnyObject' + - type: array + items: + $ref: '#/components/schemas/_AnyObject' + skipDuplicates: + type: boolean + description: Do not insert records with unique fields or ID fields that already + exist. + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemFindUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemFindFirstArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemUpdateArgs: + type: object + required: + - where + - data + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemUpdateManyArgs: + type: object + required: + - data + properties: + where: + $ref: '#/components/schemas/_AnyObject' + data: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemUpsertArgs: + type: object + required: + - create + - update + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + create: + $ref: '#/components/schemas/_AnyObject' + update: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemDeleteUniqueArgs: + type: object + required: + - where + properties: + select: + $ref: '#/components/schemas/_AnyObject' + include: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemDeleteManyArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemCountArgs: + type: object + properties: + select: + $ref: '#/components/schemas/_AnyObject' + where: + $ref: '#/components/schemas/_AnyObject' + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemAggregateArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + orderBy: + $ref: '#/components/schemas/_AnyObject' + cursor: + $ref: '#/components/schemas/_AnyObject' + take: + type: integer + skip: + type: integer + meta: + $ref: '#/components/schemas/_Meta' + Post_ItemGroupByArgs: + type: object + properties: + where: + $ref: '#/components/schemas/_AnyObject' + orderBy: + $ref: '#/components/schemas/_AnyObject' + by: + $ref: '#/components/schemas/_AnyObject' + having: + $ref: '#/components/schemas/_AnyObject' + take: + type: integer + skip: + type: integer + meta: + $ref: '#/components/schemas/_Meta' +paths: + /user/create: + post: + operationId: createUser + description: Create a new User + tags: + - user + responses: + '201': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/User' + 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/UserCreateArgs' + /user/createMany: + post: + operationId: createManyUser + description: Create several User + tags: + - user + 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/UserCreateManyArgs' + /user/findUnique: + get: + operationId: findUniqueUser + description: Find one unique User + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/User' + 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/UserFindUniqueArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /user/findFirst: + get: + operationId: findFirstUser + description: Find the first User matching the given condition + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/User' + 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/UserFindFirstArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /user/findMany: + get: + operationId: findManyUser + description: Find users matching the given conditions + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/User' + 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/UserFindManyArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /user/update: + patch: + operationId: updateUser + description: Update a User + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/User' + 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/UserUpdateArgs' + /user/updateMany: + patch: + operationId: updateManyUser + description: Update Users matching the given condition + tags: + - user + 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/UserUpdateManyArgs' + /user/upsert: + post: + operationId: upsertUser + description: Upsert a User + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/User' + 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/UserUpsertArgs' + /user/dodelete: + put: + operationId: deleteUser + description: Delete a unique user + tags: + - delete + - user + summary: Delete a user yeah yeah + deprecated: true + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/User' + 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/UserDeleteUniqueArgs' + /user/deleteMany: + delete: + operationId: deleteManyUser + description: Delete Users matching the given condition + tags: + - user + 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/UserDeleteManyArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /user/count: + get: + operationId: countUser + description: Find a list of User + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + oneOf: + - type: integer + - $ref: '#/components/schemas/UserCountAggregateOutputType' + 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/UserCountArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /user/aggregate: + get: + operationId: aggregateUser + description: Aggregate Users + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/AggregateUser' + 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/UserAggregateArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /user/groupBy: + get: + operationId: groupByUser + description: Group Users by fields + tags: + - user + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/UserGroupByOutputType' + 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/UserGroupByArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/create: + post: + operationId: createProfile + description: Create a new Profile + tags: + - profile + responses: + '201': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Profile' + 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/ProfileCreateArgs' + /profile/createMany: + post: + operationId: createManyProfile + description: Create several Profile + tags: + - profile + 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/ProfileCreateManyArgs' + /profile/findUnique: + get: + operationId: findUniqueProfile + description: Find one unique Profile + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Profile' + 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/ProfileFindUniqueArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/findFirst: + get: + operationId: findFirstProfile + description: Find the first Profile matching the given condition + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Profile' + 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/ProfileFindFirstArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/findMany: + get: + operationId: findManyProfile + description: Find a list of Profile + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/Profile' + 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/ProfileFindManyArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/update: + patch: + operationId: updateProfile + description: Update a Profile + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Profile' + 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/ProfileUpdateArgs' + /profile/updateMany: + patch: + operationId: updateManyProfile + description: Update Profiles matching the given condition + tags: + - profile + 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/ProfileUpdateManyArgs' + /profile/upsert: + post: + operationId: upsertProfile + description: Upsert a Profile + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Profile' + 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/ProfileUpsertArgs' + /profile/delete: + delete: + operationId: deleteProfile + description: Delete one unique Profile + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Profile' + 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/ProfileDeleteUniqueArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/deleteMany: + delete: + operationId: deleteManyProfile + description: Delete Profiles matching the given condition + tags: + - profile + 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/ProfileDeleteManyArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/count: + get: + operationId: countProfile + description: Find a list of Profile + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + oneOf: + - type: integer + - $ref: '#/components/schemas/ProfileCountAggregateOutputType' + 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/ProfileCountArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/aggregate: + get: + operationId: aggregateProfile + description: Aggregate Profiles + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/AggregateProfile' + 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/ProfileAggregateArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /profile/groupBy: + get: + operationId: groupByProfile + description: Group Profiles by fields + tags: + - profile + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/ProfileGroupByOutputType' + 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/ProfileGroupByArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /post_Item/create: + post: + operationId: createPost_Item + description: Create a new Post_Item + tags: + - post_Item + responses: + '201': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Post_Item' + 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/Post_ItemCreateArgs' + /post_Item/createMany: + post: + operationId: createManyPost_Item + description: Create several Post_Item + tags: + - post_Item + 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/Post_ItemCreateManyArgs' + /post_Item/findUnique: + get: + operationId: findUniquePost_Item + description: Find one unique Post_Item + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Post_Item' + 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/Post_ItemFindUniqueArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /post_Item/findFirst: + get: + operationId: findFirstPost_Item + description: Find the first Post_Item matching the given condition + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Post_Item' + 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/Post_ItemFindFirstArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /post_Item/update: + patch: + operationId: updatePost_Item + description: Update a Post_Item + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Post_Item' + 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/Post_ItemUpdateArgs' + /post_Item/updateMany: + patch: + operationId: updateManyPost_Item + description: Update Post_Items matching the given condition + tags: + - post_Item + 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/Post_ItemUpdateManyArgs' + /post_Item/upsert: + post: + operationId: upsertPost_Item + description: Upsert a Post_Item + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Post_Item' + 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/Post_ItemUpsertArgs' + /post_Item/delete: + delete: + operationId: deletePost_Item + description: Delete one unique Post_Item + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Post_Item' + 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/Post_ItemDeleteUniqueArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /post_Item/deleteMany: + delete: + operationId: deleteManyPost_Item + description: Delete Post_Items matching the given condition + tags: + - post_Item + 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/Post_ItemDeleteManyArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /post_Item/count: + get: + operationId: countPost_Item + description: Find a list of Post_Item + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + oneOf: + - type: integer + - $ref: '#/components/schemas/Post_ItemCountAggregateOutputType' + 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/Post_ItemCountArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /post_Item/aggregate: + get: + operationId: aggregatePost_Item + description: Aggregate Post_Items + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/AggregatePost_Item' + 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/Post_ItemAggregateArgs' + - name: meta + in: query + description: Superjson serialization metadata for parameter "q" + content: + application/json: + schema: {} + /post_Item/groupBy: + get: + operationId: groupByPost_Item + description: Group Post_Items by fields + tags: + - post_Item + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/Post_ItemGroupByOutputType' + 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/Post_ItemGroupByArgs' + - 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 6873ab5ce..f58b7fa09 100644 --- a/packages/plugins/openapi/tests/openapi-rpc.test.ts +++ b/packages/plugins/openapi/tests/openapi-rpc.test.ts @@ -16,10 +16,12 @@ tmp.setGracefulCleanup(); describe('Open API Plugin RPC Tests', () => { it('run plugin', async () => { for (const specVersion of ['3.0.0', '3.1.0']) { - const { model, dmmf, modelFile } = await loadZModelAndDmmf(` + for (const omitInputDetails of [true, false]) { + const { model, dmmf, modelFile } = await loadZModelAndDmmf(` plugin openapi { provider = '${normalizePath(path.resolve(__dirname, '../dist'))}' specVersion = '${specVersion}' + omitInputDetails = ${omitInputDetails} } enum role { @@ -89,40 +91,46 @@ model Bar { } `); - const { name: output } = tmp.fileSync({ postfix: '.yaml' }); - - const options = buildOptions(model, modelFile, output); - await generate(model, options, dmmf); - - console.log(`OpenAPI specification generated for ${specVersion}: ${output}`); - - const parsed = YAML.parse(fs.readFileSync(output, 'utf-8')); - expect(parsed.openapi).toBe(specVersion); - const baseline = YAML.parse( - fs.readFileSync(`${__dirname}/baseline/rpc-${specVersion}.baseline.yaml`, 'utf-8') - ); - expect(parsed).toMatchObject(baseline); - - const api = await OpenAPIParser.validate(output); - - expect(api.tags).toEqual( - expect.arrayContaining([ - expect.objectContaining({ name: 'user', description: 'User operations' }), - expect.objectContaining({ name: 'post_Item', description: 'Post-related operations' }), - ]) - ); - - expect(api.paths?.['/user/findMany']?.['get']?.description).toBe( - 'Find users matching the given conditions' - ); - const del = api.paths?.['/user/dodelete']?.['put']; - expect(del?.description).toBe('Delete a unique user'); - expect(del?.summary).toBe('Delete a user yeah yeah'); - expect(del?.tags).toEqual(expect.arrayContaining(['delete', 'user'])); - expect(del?.deprecated).toBe(true); - expect(api.paths?.['/post/findMany']).toBeUndefined(); - expect(api.paths?.['/foo/findMany']).toBeUndefined(); - expect(api.paths?.['/bar/findMany']).toBeUndefined(); + const { name: output } = tmp.fileSync({ postfix: '.yaml' }); + + const options = buildOptions(model, modelFile, output); + await generate(model, options, dmmf); + + console.log( + `OpenAPI specification generated for ${specVersion}${omitInputDetails ? ' - omit' : ''}: ${output}` + ); + + const parsed = YAML.parse(fs.readFileSync(output, 'utf-8')); + expect(parsed.openapi).toBe(specVersion); + const baseline = YAML.parse( + fs.readFileSync( + `${__dirname}/baseline/rpc-${specVersion}${omitInputDetails ? '-omit' : ''}.baseline.yaml`, + 'utf-8' + ) + ); + expect(parsed).toMatchObject(baseline); + + const api = await OpenAPIParser.validate(output); + + expect(api.tags).toEqual( + expect.arrayContaining([ + expect.objectContaining({ name: 'user', description: 'User operations' }), + expect.objectContaining({ name: 'post_Item', description: 'Post-related operations' }), + ]) + ); + + expect(api.paths?.['/user/findMany']?.['get']?.description).toBe( + 'Find users matching the given conditions' + ); + const del = api.paths?.['/user/dodelete']?.['put']; + expect(del?.description).toBe('Delete a unique user'); + expect(del?.summary).toBe('Delete a user yeah yeah'); + expect(del?.tags).toEqual(expect.arrayContaining(['delete', 'user'])); + expect(del?.deprecated).toBe(true); + expect(api.paths?.['/post/findMany']).toBeUndefined(); + expect(api.paths?.['/foo/findMany']).toBeUndefined(); + expect(api.paths?.['/bar/findMany']).toBeUndefined(); + } } });