Skip to content

Fixed swagger mismatches #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

raheeqi
Copy link
Contributor

@raheeqi raheeqi commented Mar 27, 2025

Test plan: Ran though swaggerdocs and UI to fix name mismatches cause 500 errors

@raheeqi raheeqi requested a review from am5815 March 27, 2025 06:00
@raheeqi raheeqi requested review from cbolles and nmr2701 March 27, 2025 06:07
Copy link
Member

@cbolles cbolles left a comment

Choose a reason for hiding this comment

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

It looks like a lot of different changes are being made in this PR, maybe we want to discuss a way of breaking them up

@@ -16,7 +16,7 @@ export class Message {
example: 'Hello, how can you help me today?'
})
@IsString()
text: string;
content: string;
Copy link
Member

Choose a reason for hiding this comment

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

The field should be text not content

@@ -24,27 +24,27 @@ import { CreateProxyMappingDto } from './dtos/create.dto';
export class DeepchatProxyController {
constructor(private readonly deepchatProxyService: DeepchatProxyService) {}

@Get('/:id')
@Get('/:model')
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure we want to move away from using the ID for handling the proxying

return response;
}

async proxyRequestByModel(model: string, body: any): Promise<any> {
Copy link
Member

Choose a reason for hiding this comment

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

I think for now we want to keep the proxy request by ID

toJSON: {
virtuals: true,
transform: (_, ret) => {
ret.id = ret._id;
Copy link
Member

Choose a reason for hiding this comment

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

We currently use _id through the code, so for now I wouldn't apply the transformation

createdAt: Date;

@ApiProperty({ description: 'Last update timestamp', format: 'date-time' })
@Prop({ default: Date.now })
Copy link
Member

Choose a reason for hiding this comment

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

I think these defaults are ok

@raheeqi raheeqi requested a review from cbolles April 2, 2025 18:40
@raheeqi
Copy link
Contributor Author

raheeqi commented Apr 2, 2025

It looks like a lot of different changes are being made in this PR, maybe we want to discuss a way of breaking them up

Retested and made changes

@cbolles cbolles force-pushed the main branch 4 times, most recently from 0c3565a to 96377d3 Compare April 16, 2025 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants