Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
657 changes: 657 additions & 0 deletions AUTOBE-GENERATION-REPORT.md

Large diffs are not rendered by default.

823 changes: 632 additions & 191 deletions README.md

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions autobe-analysis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Todo API (Generated with Z.ai GLM-4.6)

## Features
- User authentication
- Todo CRUD operations
- PostgreSQL + Prisma
- NestJS framework

## Files
- schema.prisma - Database schema
- openapi.yaml - API specification
- todo.controller.ts - NestJS controller
- todo.service.ts - Business logic

## Generated by
- Model: glm-4.6
- Provider: Z.ai
321 changes: 321 additions & 0 deletions autobe-analysis/openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,321 @@
```yaml
Copy link

@cubic-dev-ai cubic-dev-ai bot Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file is wrapped in Markdown fences (yaml ... ), so the OpenAPI document is not valid YAML and cannot be parsed by tooling. Please remove the code fence lines.

Prompt for AI agents
Address the following comment on autobe-analysis/openapi.yaml at line 1:

<comment>The file is wrapped in Markdown fences (```yaml ... ```), so the OpenAPI document is not valid YAML and cannot be parsed by tooling. Please remove the code fence lines.</comment>

<file context>
@@ -0,0 +1,321 @@
+```yaml
+openapi: 3.0.0
+info:
</file context>
Fix with Cubic

openapi: 3.0.0
info:
title: Todo API
description: A simple API for managing a list of todos with user authentication.
version: 1.0.0
servers:
- url: https://api.example.com/v1
description: Production Server
paths:
/auth/register:
post:
summary: Register a new user
description: Creates a new user account.
tags:
- Authentication
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- username
- password
properties:
username:
type: string
example: johndoe
password:
type: string
format: password
example: a_strong_password
responses:
'201':
description: User registered successfully
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: User created successfully
'400':
description: Invalid input provided
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Username already exists
content:
application/json:
schema:
$ref: '#/components/schemas/Error'

/auth/login:
post:
summary: Login user
description: Authenticates a user and returns a JWT token.
tags:
- Authentication
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- username
- password
properties:
username:
type: string
example: johndoe
password:
type: string
format: password
example: a_strong_password
responses:
'200':
description: Login successful
content:
application/json:
schema:
type: object
properties:
accessToken:
type: string
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
'401':
description: Invalid credentials
content:
application/json:
schema:
$ref: '#/components/schemas/Error'

/todos:
get:
summary: List all todos
description: Retrieves a list of all todos for the authenticated user.
tags:
- Todos
security:
- BearerAuth: []
responses:
'200':
description: A list of todos
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Todo'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
summary: Create a new todo
description: Adds a new todo to the list for the authenticated user.
tags:
- Todos
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- title
properties:
title:
type: string
example: Buy groceries
completed:
type: boolean
example: false
responses:
'201':
description: Todo created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Todo'
'400':
description: Invalid input provided
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'

/todos/{id}:
get:
summary: Get a todo by ID
description: Fetches a single todo item for the authenticated user.
tags:
- Todos
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
description: The ID of the todo to retrieve
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Todo'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Todo not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
summary: Update a todo
description: Updates an existing todo for the authenticated user.
tags:
- Todos
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
description: The ID of the todo to update
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
title:
type: string
example: Buy groceries
completed:
type: boolean
example: true
responses:
'200':
description: Todo updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Todo'
'400':
description: Invalid input provided
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Todo not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
summary: Delete a todo
description: Deletes a todo item for the authenticated user.
tags:
- Todos
security:
- BearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
description: The ID of the todo to delete
responses:
'204':
description: Todo deleted successfully
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Todo not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'

components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
Todo:
type: object
properties:
id:
type: integer
format: int64
readOnly: true
example: 1
title:
type: string
example: Buy groceries
completed:
type: boolean
example: false
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true
Error:
type: object
properties:
error:
type: string
example: A human-readable error message
message:
type: string
example: A detailed message explaining the error
```
18 changes: 18 additions & 0 deletions autobe-analysis/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "todo-api-zai",
"version": "1.0.0",
"description": "Todo API generated with Z.ai GLM-4.6",
"scripts": {
"start": "nest start",
Copy link

@cubic-dev-ai cubic-dev-ai bot Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm run start will fail because the project does not declare any dependency that provides the nest binary invoked here; add @nestjs/cli (dev) dependency or run it via an installed binary.

Prompt for AI agents
Address the following comment on autobe-analysis/package.json at line 6:

<comment>`npm run start` will fail because the project does not declare any dependency that provides the `nest` binary invoked here; add `@nestjs/cli` (dev) dependency or run it via an installed binary.</comment>

<file context>
@@ -0,0 +1,18 @@
+  &quot;version&quot;: &quot;1.0.0&quot;,
+  &quot;description&quot;: &quot;Todo API generated with Z.ai GLM-4.6&quot;,
+  &quot;scripts&quot;: {
+    &quot;start&quot;: &quot;nest start&quot;,
+    &quot;start:dev&quot;: &quot;nest start --watch&quot;,
+    &quot;build&quot;: &quot;nest build&quot;
</file context>
Fix with Cubic

"start:dev": "nest start --watch",
"build": "nest build"
},
"dependencies": {
"@nestjs/common": "^10.0.0",
"@nestjs/core": "^10.0.0",
"@nestjs/platform-express": "^10.0.0",
"@nestjs/jwt": "^10.0.0",
"@prisma/client": "^6.0.0",
"bcrypt": "^5.1.0"
}
}
33 changes: 33 additions & 0 deletions autobe-analysis/schema.prisma
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
```prisma
Copy link

@cubic-dev-ai cubic-dev-ai bot Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the Markdown code fences ( ```prisma ... ```) from the Prisma schema file; they break Prisma's schema parser.

Prompt for AI agents
Address the following comment on autobe-analysis/schema.prisma at line 1:

<comment>Remove the Markdown code fences (` ```prisma` ... ` ``` `) from the Prisma schema file; they break Prisma&#39;s schema parser.</comment>

<file context>
@@ -0,0 +1,33 @@
+```prisma
+// This is your Prisma schema file,
+// learn more about it in the docs: https://pris.ly/d/prisma-schema
</file context>
Fix with Cubic

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
provider = "prisma-client-js"
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

model User {
id String @id @default(cuid())
email String @unique
password String
name String
createdAt DateTime @default(now())
todos Todo[]
}

model Todo {
id String @id @default(cuid())
title String
description String?
completed Boolean @default(false)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}
```
Loading