feat: order the object metadata items of the API alphabetically (#12558)

resolve #12549
This PR updates the `findManyWithinWorkspace` function to order the
object metadata items alphabetically by `namePlural` in ascending order.


https://github.com/user-attachments/assets/0be77a37-173f-4cf2-86eb-8f2420d8ff51
This commit is contained in:
Naifer
2025-06-13 06:09:59 +01:00
committed by GitHub
parent 9f579c84c1
commit b160871227
2 changed files with 8 additions and 1 deletions

View File

@ -62,7 +62,11 @@ export class OpenApiService {
await this.accessTokenService.validateTokenByRequest(request);
objectMetadataItems =
await this.objectMetadataService.findManyWithinWorkspace(workspace.id);
await this.objectMetadataService.findManyWithinWorkspace(workspace.id, {
order: {
namePlural: 'ASC',
},
});
} catch (err) {
return schema;
}

View File

@ -430,6 +430,9 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
...options?.where,
workspaceId,
},
order: {
...options?.order,
},
});
}