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.ServerRuby]: 'rb',
[Platform.ServerSwift]: 'swift',
[Platform.ServerAndroidJava]: 'java',
[Platform.ServerAndroidKotlin]: 'kotlin',
[Platform.ServerJava]: 'java',
[Platform.ServerKotlin]: 'kotlin',
[Platform.ServerGraphql]: 'graphql',
[Platform.ServerRest]: 'http',
vue: 'html',

View File

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

View File

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