rita1
5 years agoOccasional Visitor
Representing a jwt token as a formData parameter
Hey!
I'm writing a 2.0 swagger file. It has a POST path, which consumes x-www-form-urlencoded and includes a JWT token as a parameter.
This token, before it's signed, should contain a JSON object.
The problem is I can't find a good way of describing this in the swagger file. Essentially this token is a string, and as such should be represented as - in:formData, from what I understand, but in this case there's no way to use a $ref to describe all the object's properties before it was signed.
I can leave the schema definition of the JSON object and just refer to it in the token parameter description, but I was wondering if there's a better way?
Thanks in advance!