swagger-parser icon indicating copy to clipboard operation
swagger-parser copied to clipboard

Bundling with internal refs for AWS API Gateway causing errors

Open byumark opened this issue 8 years ago • 3 comments

When I bundle my swagger files using swagger-cli, it works great but AWS API Gateway doesn't like the internal references, apparently.

This is the error I am getting:

No integration defined for method

It works fine for the first reference since presumably it is dereferenced. Do you have any thoughts on this? Could the swagger-cli allow all references to be dereferenced?

byumark avatar Feb 28 '17 00:02 byumark

If you want to dereference all references (not just external ones), then use the --dereference option in Swagger CLI (or the dereference() method in Swagger Parser)

JamesMessinger avatar Feb 28 '17 01:02 JamesMessinger

Okay, cool. I'll try that. Thanks for the input. Is there an option to dereference just external references?

byumark avatar Feb 28 '17 15:02 byumark

That's the point of the bundle command. It only dereferences external references. But it sounds like that's not sufficient for AWS API Gateway, so you'll have to fully dereference everything instead

JamesMessinger avatar Feb 28 '17 17:02 JamesMessinger