Model definitions and input parameter descriptions missing from API Documentation

Hello, we’re evaluating Tyk and finding that it’s very time consuming due to the lack of model definitions in the API documentation. For example, if I want to POST to resource like users or keys, all I have to go off is one example POST body that doesn’t explain what the input parameters are (descriptions nor types).

Please add model definitions (each property description and type) as well as request/response property types and descriptions.

For example, when creating an API key in the Dashboard, I have options for HMAC, Basic, JWT, etc. In the example request at https://tyk.io/docs/tyk-advanced-management-api-v-0-9/api-tokens/, none of those values appear to exist.

`POST /api/keys HTTP/1.1
Host: localhost:3000
authorization:7a7b140f-2480-4d5a-4e78-24049e3ba7f8

{
“last_check”: 0,
“allowance”: 1000,
“rate”: 1000,
“per”: 60,
“expires”: 0,
“quota_max”: 10000,
“quota_renews”: 1424543479,
“quota_remaining”: 10000,
“quota_renewal_rate”: 2520000,
“access_rights”: {
“bc2f8cfb7ab241504d9f3574fe407499”: {
“api_id”: “bc2f8cfb7ab241504d9f3574fe407499”,
“api_name”: “Test”,
“versions”: [
“Default”
]
}
}`

Hi,

Yo make a valid point - and we’re working on making he docs easier to understand. for this particular case (A token session object), they are explained in depth here:

https://tyk.io/docs/tyk-api-gateway-v-2-0/quotas-rate-limits-and-security/understanding-tyk-token-session-objects/

We’ll add more detail to other models that are described int he APIs in due course

Thanks,
Martin

Thanks Martin. I was able to also grab that data from here after digging about a bit through the auth handling code:

https://github.com/TykTechnologies/tyk/blob/master/session_state.go#L25

In that respect, it helped us better understand the Tyk authentication middleware and how session state is stored but since we are having a few hiccups getting things up and running quickly, it definitely has taken a bit of time to dissect.

No further info needed on this request and thanks for the reply. I’m sure everyone will appreciate the new docs (You should be able to programmatically generate the docs since you do have the struct definitions :slight_smile: )

1 Like