OAS 3.0.3 request schema for an empty JSON body
I am attempting to create an OAS schema for an empty JSON body: { } I am trying to get the documentation to show an empty JSON body, and have that autogenerated. The API defines this as a POST (yes, it ought to be a GET, the design of the API is in some respects sub-optimal) request, and expects the open/close bracket, and nothing else. I've tried … content: application/json: { } … but that doesn't work (it just shows nothing in the request body), and everything else I've tried is invalid. Would appreciate any assistance on this. I have not been able to find any examples or even similar questions (maybe I’m looking in the wrong place?). Any assistance would be greatly appreciated!Solved6.4KViews0likes2CommentsWhat does <*> symbol represent in json swagger?
I have a question in JSON swagger. May I know what does <*> symbol represent in JSON swagger? This is how the format looks like after I import the JSON swagger into the online editor. What does <*> actually mean? CrossCurrencyRequest{ items* { < * >: CurrencyPairRequest{ amount* number currencyPair* string decimalPlace integer($int32) } } } Below are the definitions from the swagger file. definitions: CrossCurrencyRequest: type: object required: - items properties: items: type: object additionalProperties: $ref: '#/definitions/CurrencyPairRequest' title: CrossCurrencyRequest I have the sample request as given below. How to make the request generates the "key1", "key2", etc? As it seems like not a predefined object from the swagger file. Sample request: { "items": { "key1": { "amount": 1000.123456789, "currencyPair": "USD-SGD", "decimalPlace": 5 }, "key2": { "amount": 1000.12345, "currencyPair": "USD-IDR" }, "key3": { "amount": 1000.12345, "currencyPair": "USD-ZNH" } } }Solved