Swagger multiple Schemas in one response
openapi: 3.0.0 info: version: '1.0' title: Receipt API description: the ultimate receipt API servers: # Added by API Auto Mocking Plugin - description: SwaggerHub API Auto Mocking url: https://virtserver.swaggerhub.com/d.martins/receipts/1.0 paths: /receipts/: post: tags: - Receipts requestBody: $ref: '#/components/requestBodies/Items' responses: 201: description: Created components: requestBodies: Items: content: 'application/json': schema: $ref: '#/components/schemas/Items' Merchant: content: 'application/json': schema: $ref: '#/components/schemas/Merchant' schemas: Items: type: object properties: product: type: integer example: Bananas product category: type: integer example: Healthy fruit ean: type: string example: 1234567891012 price: type: number example: 19,99€ discount: type: string example: 15% discount value: type: number example: 2,98€ Merchant: type: object properties: merchant id: type: number example: 12345 store id: type: string example: ABC123456789 cashier: type: string example: Max Muster Receipt_properties: type: object properties: Receipt id: type: string example: ABC123456789123456789 transaction date and time: type: string example: 2021-05-05T11:11:11.123Z format: date-time Hey everyone, i am new to coding and try to learn how to create an api by writing one that should transfer receipt data. i managed to create Schemas to have a nice overview of all values. However i only manage to get one schema into my Post response, whatever i try i just run into error which is quite frustrating. I am Happy for any help! attached is the code:1.2KViews0likes0Commentsgenerate server for Java 7
Hi, I have a yaml file loaded in editor.swagger.io and from there, I have generated the server code for jaxrs-resteasy. The problem is this code must be integrated in a Java 7 project and Swagger generates the code for Java 8. Is there any way to generate in Swagger the code for Java 7?