MingweiSamuel / riotapi-schema

OpenAPI/Swagger Schema of the Riot Games API
http://www.mingweisamuel.com/riotapi-schema/tool/
41 stars 9 forks source link

Annotate enum types #12

Closed MingweiSamuel closed 5 years ago

MingweiSamuel commented 5 years ago

From @RyadaProductions

name -> enum mappings

    // Cases for EndpointMethods.cs
    case 'queue':
      return 'RankedQueues';
    case 'champion':
    case 'championId':
      return 'Champion';
    case 'division':
      return 'Division';
    case 'tier':
      return 'Tier';
    // Cases for DataClasses.cs
    case 'Queue':
    case 'QueueId':
    case 'GameQueueConfigId':
      return 'Queues';
    case 'season':
    case 'Season':
    case 'SeasonId':
      return 'Seasons';
    case 'Champion':
    case 'ChampionId':
      return 'Champion';
    case 'GameType':
      return 'GameTypes';
    case 'GameMode':
      return 'GameModes';
    case 'MapId':
      return 'Maps';
    case 'Locale':
    case 'Locales':
      return 'Locale';
    case 'TeamId':
      return 'TeamId';
    case 'HighestAchievedSeasonTier':
      return 'Tier';
MingweiSamuel commented 5 years ago

Explicit mappings:

Endpoints

{
    "league-exp-v4.getLeagueEntries.queue": "queueType",
    "league-v4.getChallengerLeague.queue": "queueType",
    "league-v4.getLeagueEntriesForSummoner.queue": "queueType",
    "league-v4.getLeagueEntries.queue": "queueType",
    "league-v4.getGrandmasterLeague.queue": "queueType",
    "league-v4.getMasterLeague.queue": "queueType",

    "champion-mastery-v4.getChampionMastery.championId": "champion",

    "league-exp-v4.getLeagueEntries.division": "division",
    "league-v4.getLeagueEntries.division": "division",

    "league-exp-v4.getLeagueEntries.tier": "tier",
    "league-v4.getLeagueEntries.tier": "tier"
}

DTOs:

Name ambiguity:

MingweiSamuel commented 5 years ago

rewrote into 3cd3da7a15edd63c70f3cd937267a29abb77af04