Closed mchimirev closed 8 years ago
That setup sounds neat!
Curling the invocations endpoint (https://o2v8ovbvyj.execute-api.us-east-1.amazonaws.com/invocations/java_models_via_mobile_lambda), I get a "403 Forbidden" return code, and I was also able to make a local copy of apidoc spit out that error code. That makes me think that the generator is not actually receiving requests.
{
"service": {
"apidoc": {
"version": "0.9.6"
},
"name": "Checkout Api",
"organization": {
"key": "gilt"
},
...
I updated api gateway to support this endpoint (POST) https://o2v8ovbvyj.execute-api.us-east-1.amazonaws.com/prod/invocations/java_models_via_mobile_lambda
On Wed, Sep 16, 2015 at 9:06 AM, Sean Smith notifications@github.com wrote:
That setup sounds neat!
Curling the invocations endpoint ( https://o2v8ovbvyj.execute-api.us-east-1.amazonaws.com/invocations/java_models_via_mobile_lambda), I get a "403 Forbidden" return code, and I was also able to make a local copy of apidoc spit out that error code. That makes me think that the generator is not actually receiving requests.
— Reply to this email directly or view it on GitHub https://github.com/mbryzek/apidoc/issues/368#issuecomment-140735829.
locally, i added the generator with this URL:
https://o2v8ovbvyj.execute-api.us-east-1.amazonaws.com/prod
When invoking the code generator, I got back this error:
Generator failed with HTTP 200: Invalid json for class[com.bryzek.apidoc.generator.v0.models.Invocation]: (/files,List(ValidationError(List(error.path.missing),WrappedArray()))) (/source,List(ValidationError(List(error.path.missing),WrappedArray())))
We are expecting to get back an "Invocation":
http://www.apidoc.me/bryzek/apidoc-generator/0.9.30#model-invocation
containing two fields: files and source - and it looks like the document we got back did not have those keys.
Hope this helps! and I can't wait to see the output of the generator (esp mobile ones). and if still problematic - if you can, pls add me to your generator project and I can take a look.
When I made an attempt to add a generator I got a 500 Looking into this
my generator is seemingly available for every one yes - they are only global (awhile back we had finer grain controls on visibility, but it was confusing). Hopefully this is okay - but if not pls let me know and i'll reprioritize work to add permissions on generators.
generator "java_models_via_mobile_lambda" is stuck up there I can remove for you (and logged the need to make this available in UI @ https://github.com/mbryzek/apidoc/issues/370)
thanks!
On Wed, Sep 16, 2015 at 1:20 PM, mchimirev notifications@github.com wrote:
I updated api gateway to support this endpoint (POST)
On Wed, Sep 16, 2015 at 9:06 AM, Sean Smith notifications@github.com wrote:
That setup sounds neat!
Curling the invocations endpoint (
https://o2v8ovbvyj.execute-api.us-east-1.amazonaws.com/invocations/java_models_via_mobile_lambda ), I get a "403 Forbidden" return code, and I was also able to make a local copy of apidoc spit out that error code. That makes me think that the generator is not actually receiving requests.
— Reply to this email directly or view it on GitHub https://github.com/mbryzek/apidoc/issues/368#issuecomment-140735829.
— Reply to this email directly or view it on GitHub https://github.com/mbryzek/apidoc/issues/368#issuecomment-140810570.
My assumption is that I should be serving java models from this URL:
with Body looking like this:
{
"service": {
"apidoc": {
"version": "0.9.6"
},
"name": "Checkout Api",
"organization": {
"key": "gilt"
},
"application": {
"key": "checkout-api"
},
"namespace": "com.gilt.checkout.api.v0",
"version": "0.1.50",
...
When I make that request (in POSTMAN), I do get back JSON containing source and files.
My guess is the endpoint where I'm serving generator from is not exactly the same as the one that apidoc is expecting.
Chatted w/ Mike - all seems fixed now
For reference, this is where my generators are running. Just java generator for now, but we'll be serving an Android one and IOS/Swift one from this endpoint.
Although my generator is not implemented in a standard way, from what I understand, generators should be able to run any where as long as they serve correct JSON. My generator, for example uses AWS Gateway + AWS Lambda, which then wraps api-generator library. This allows us to not to have to run an instance all the time just to serve a generator.
https://o2v8ovbvyj.execute-api.us-east-1.amazonaws.com/prod/generators?offset=0&limit=10