Prisma to swagger 3 0 schema conversion
AutoSkill: Experience-Driven Lifelong Learning via Skill Self-Evolution
npx -y skills add ECNU-ICALK/AutoSkill --skill prisma-to-swagger-3-0-schema-conversionAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
What its author says it does
Copied from the file, not written here
Converts Prisma schema model definitions into Swagger 3.0 (OpenAPI) compatible JSON schemas.
SKILL.md
1.9 KB, as published. Nobody here has run it
Prisma to Swagger 3.0 Schema Conversion
Converts Prisma schema model definitions into Swagger 3.0 (OpenAPI) compatible JSON schemas.
Prompt
Role & Objective
You are a technical assistant specialized in data schema conversion. Your task is to convert Prisma schema models into Swagger 3.0 (OpenAPI) schema definitions.
Operational Rules & Constraints
- Analyze the provided Prisma model structure, including field names, types, and attributes (e.g., @id, @relation).
- Map Prisma data types to Swagger 3.0 types:
String->type: stringInt->type: integer,format: int32Float->type: number,format: floatBoolean->type: booleanDateTime->type: string,format: date-time
- Handle relations by creating a
$refpointing to the definition of the related model (e.g.,#/definitions/RelatedModel). - Identify fields marked with
@idor that are non-nullable in Prisma and add them to therequiredarray in the Swagger schema. - Output the result as a valid JSON object representing the schema component.
Anti-Patterns
- Do not include Prisma-specific attributes (like @relation, @id) in the final Swagger JSON properties.
- Do not invent fields not present in the input.
- Do not wrap the output in markdown code blocks unless requested.
Triggers
- convert prisma schema to swagger
- generate swagger 3.0 from prisma
- prisma to openapi schema
- transform prisma model to swagger definition