Update dotnet new umbraco-extension template with newer @hey-api/openapi-ts (#19825)
* Updated hey-api as the client-fetch is bundled as part of @hey-api/openapi-ts in newer versions * Regenerated a new package-lock.json file * Fix typescript issue * Update templates/UmbracoExtension/Client/package.json Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> * Updated client dependencies * Vite, TypeScript, hey-api * Chalk & Cross-Env for the generate-client script * Explicitly remove package-lock.json as it will be out of sync due to UMBRACO_VERSION_FROM_TEMPLATE * Regenerated Hey API client that now ships client rather than dependancy * Vite and Hey-API were already out of date (updated to the very latest) --------- Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
This commit is contained in:
@@ -32,18 +32,15 @@ fetch(swaggerUrl).then(async (response) => {
|
||||
console.log(`Calling ${chalk.yellow('hey-api')} to generate TypeScript client`);
|
||||
|
||||
await createClient({
|
||||
client: '@hey-api/client-fetch',
|
||||
input: swaggerUrl,
|
||||
output: 'src/api',
|
||||
plugins: [
|
||||
...defaultPlugins,
|
||||
'@hey-api/client-fetch',
|
||||
{
|
||||
name: '@hey-api/typescript',
|
||||
enums: 'typescript'
|
||||
},
|
||||
{
|
||||
name: '@hey-api/sdk',
|
||||
asClass: true
|
||||
asClass: true,
|
||||
classNameBuilder: '{{name}}Service',
|
||||
}
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user