fix: server java enums

This commit is contained in:
Torsten Dittmann
2023-10-11 22:28:17 +02:00
parent 9748089903
commit 9fb9ba0c31
3 changed files with 9 additions and 9 deletions

View File

@@ -74,8 +74,8 @@ const platformAliases: Record<string, keyof typeof languages> = {
[Platform.ServerPython]: 'py', [Platform.ServerPython]: 'py',
[Platform.ServerRuby]: 'rb', [Platform.ServerRuby]: 'rb',
[Platform.ServerSwift]: 'swift', [Platform.ServerSwift]: 'swift',
[Platform.ServerAndroidJava]: 'java', [Platform.ServerJava]: 'java',
[Platform.ServerAndroidKotlin]: 'kotlin', [Platform.ServerKotlin]: 'kotlin',
[Platform.ServerGraphql]: 'graphql', [Platform.ServerGraphql]: 'graphql',
[Platform.ServerRest]: 'http', [Platform.ServerRest]: 'http',
vue: 'html', vue: 'html',

View File

@@ -40,8 +40,8 @@ export enum Platform {
ServerPython = 'server-python', ServerPython = 'server-python',
ServerRuby = 'server-ruby', ServerRuby = 'server-ruby',
ServerSwift = 'server-swift', ServerSwift = 'server-swift',
ServerAndroidKotlin = 'server-kotlin', ServerKotlin = 'server-kotlin',
ServerAndroidJava = 'server-java', ServerJava = 'server-java',
ServerGraphql = 'server-graphql', ServerGraphql = 'server-graphql',
ServerRest = 'server-rest', ServerRest = 'server-rest',
} }
@@ -62,8 +62,8 @@ export const platformMap: Record<Language | string, string> = {
[Platform.ServerPython]: 'Python', [Platform.ServerPython]: 'Python',
[Platform.ServerRuby]: 'Ruby', [Platform.ServerRuby]: 'Ruby',
[Platform.ServerSwift]: 'Swift', [Platform.ServerSwift]: 'Swift',
[Platform.ServerAndroidKotlin]: 'Kotlin', [Platform.ServerKotlin]: 'Kotlin',
[Platform.ServerAndroidJava]: 'Java', [Platform.ServerJava]: 'Java',
[Platform.ServerGraphql]: 'GraphQL', [Platform.ServerGraphql]: 'GraphQL',
[Platform.ServerRest]: 'REST', [Platform.ServerRest]: 'REST',
sh: 'Shell', sh: 'Shell',

View File

@@ -208,10 +208,10 @@ export async function getService(
/** /**
* Exceptions for Android SDK. * Exceptions for Android SDK.
*/ */
const isAndroidJava = platform === Platform.ClientAndroidJava || platform === Platform.ServerAndroidJava; const isAndroidJava = platform === Platform.ClientAndroidJava || platform === Platform.ServerJava;
const isAndroidKotlin = platform === Platform.ClientAndroidKotlin || platform === Platform.ServerAndroidKotlin; const isAndroidKotlin = platform === Platform.ClientAndroidKotlin || platform === Platform.ServerKotlin;
const isAndroid = isAndroidJava || isAndroidKotlin; const isAndroid = isAndroidJava || isAndroidKotlin;
const isAndroidServer = platform === Platform.ServerAndroidJava || platform === Platform.ServerAndroidKotlin; const isAndroidServer = platform === Platform.ServerJava || platform === Platform.ServerKotlin;
const api = await getApi(version, platform); const api = await getApi(version, platform);
const tag = api.tags?.find((n) => n.name === service); const tag = api.tags?.find((n) => n.name === service);