fix: enhance DTO generation, schema validation, and formatting logic #71
@@ -123,6 +123,12 @@ export function buildTagsMapFromAnalysis(
|
|||||||
const hasQueryParams = (op.parameters || []).some((p) => p.in === 'query');
|
const hasQueryParams = (op.parameters || []).some((p) => p.in === 'query');
|
||||||
const hasBodyParam = !!op.requestBody;
|
const hasBodyParam = !!op.requestBody;
|
||||||
|
|
||||||
|
// Sort: required params first, optional params last (TypeScript requirement)
|
||||||
|
allParams.sort((a, b) => {
|
||||||
|
if (a.required === b.required) return 0;
|
||||||
|
return a.required ? -1 : 1;
|
||||||
|
});
|
||||||
|
|
||||||
tagsMap[tag].push({
|
tagsMap[tag].push({
|
||||||
nickname: op.operationId || `${method}${pathKey.replace(/\//g, '_')}`,
|
nickname: op.operationId || `${method}${pathKey.replace(/\//g, '_')}`,
|
||||||
summary: op.summary || '',
|
summary: op.summary || '',
|
||||||
|
|||||||
Reference in New Issue
Block a user