mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
13 lines
373 B
TypeScript
13 lines
373 B
TypeScript
import { Model } from '../client/interfaces/Model';
|
|
|
|
export function getModelNames(models: Model[]): string[] {
|
|
return models
|
|
.map(model => model.name)
|
|
.concat('Dictionary')
|
|
.sort((a, b) => {
|
|
const nameA = a.toLowerCase();
|
|
const nameB = b.toLowerCase();
|
|
return nameA.localeCompare(nameB, 'en');
|
|
});
|
|
}
|