Closed tomduhourq closed 7 years ago
Well if that's your entire spec, I can say that the parser isn't going to like it.
source
has an unqualified and non-existent reference. What does EventSource
look like?
source
has a $ref
with a description
, which is not allowed. $ref
must live alone on a single line.
You are also using an old swagger-spec version. Can you just convert it using the -l swagger
to 2.0 and work with that?
source
is an Enumerator. Got the new swagger.json
with the command you passed over with no success. Here is the Binnacle.js
file method:
module.exports.checkoutStep = function checkoutStep (req, res, next) {
var body = req.swagger.params['body'].value;
var result = Binnacle.checkoutStep(body);
if(typeof result !== 'undefined') {
res.setHeader('Content-Type', 'application/json');
res.end(JSON.stringify(result || {}, null, 2));
}
else
res.end();
};
Does the codegen have any trouble with Enums?
@tomduhourq please pull the latest master (which has better enum support for several lanaguages) to give it a try.
In your spec, I don't see parameter or property defined as enum though.
Closing this as there's no update.
I currently have the following Api Spec
When generating my js service I currently have no field specification of the model
InputParamCheckoutSpec
, only its name as a parameter in the generatedNodeJs
code, like this:I am using the latest version like this:
What I would like to have are the fields required on the endpoints, such as
chkStep
andgoogleId
on the generated code.