aalises / age-of-empires-II-api

API for Age of Empires II Built with Flask-RESTFul + SQLAlchemy
https://age-of-empires-2-api.herokuapp.com
BSD 3-Clause "New" or "Revised" License
120 stars 31 forks source link

Incorrect Model for Civilization #8

Closed 0xLeif closed 4 years ago

0xLeif commented 4 years ago

Screen Shot 2019-12-14 at 4 45 36 PM

Issue

let unique_unit: String
let unique_tech: String

Should be

let unique_unit: [String]
let unique_tech: [String]

Correct Model

struct Civilization: Codable {
    let id: Int
    let name: String
    let expansion: String
    let army_type: String
    let unique_unit: [String]
    let unique_tech: [String]
    let team_bonus: String
    let civilization_bonus: [String]
}
aalises commented 4 years ago

Hello @zmeriksen ! thanks for pointing that out. The model is indeed correct on the API but not on the documentation (as it's not automatically generated based on the models). Just pushed the fix ^^