jaim23mf / API_eroma2

0 stars 0 forks source link

ShopType format #2

Closed nicholaslambertucci-ett closed 1 year ago

nicholaslambertucci-ett commented 1 year ago

In the response of /Shop/Category endpoint, the type and format of shopType shopType is incorrect. It should be a string with defined values, not a number. Please refer to Shop Category doc and Shop Type Doc

jaim23mf commented 1 year ago

ShopType is an enum as the Doc tells

public enum StoreType {
    foodAndBeverage=1,
    store=2
}

Do you need an endpoint that returns a string instead the enum?

nicholaslambertucci-ett commented 1 year ago

Yes, api must return the label associated to enum value.

Here the schema for that type

{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "https://ettsolutions.com/pta/wayfinding/jsonschemas/shop-type-enum.schema.json",
    "title": "Shop type definition",
    "description": "Defines under which group the shop will be displayed",
    "type": "string",
    "minLength": 1,
    "enum": [
        "foodAndBeverage",
        "store"
    ]
}
jaim23mf commented 1 year ago

new endpoint added /Shop/CategoryM

this will send the correct StoreType