Contributions
Problem with Doc generation and then code generation
I've just started to look over SwaggerHub and am doing so by pointing it at a Magento server that I maintain. The problem that I am having is that models are not always created within the documentation which then impacts the code generation (I guess). The following is the doc produced for a call based call on the server /V1/carts/{cartId}/update-order: post: tags: - mageplazaSmtpCheckoutManagementV1 description: '' operationId: mageplazaSmtpCheckoutManagementV1UpdateOrderPost consumes: - application/json - application/xml produces: - application/json - application/xml parameters: - name: cartId in: path type: string required: true - name: mageplazaSmtpCheckoutManagementV1UpdateOrderPostBody in: body schema: required: - address - isOsc properties: address: type: string isOsc: type: boolean type: object xml: name: request responses: '200': description: 200 Success. schema: type: boolean default: description: Unexpected error schema: $ref: '#/definitions/error-response' The issue is with the named parameter "mageplazaSmtpCheckoutManagementV1UpdateOrderPostBody". This does not result in a model being generated within the docs, but the Java client generator does expect a model to be defined in this situation as the function mapped to this API includes import io.swagger.client.model.MageplazaSmtpCheckoutManagementV1UpdateOrderPostBody; So ether the code generator is meant to be coding this model inline or the doc is meant to be creating the doc for the model so that the code generator can create a matching function. Anyone got any ideas?471Views0likes0Comments