When I submit a POST request from my Vuejs app to my a127/apigee-127 Rest Service the http response is a 500:
{"message":"Cannot resolve the configured swagger-router handler: IAGController_post"}
What seems to be happening is the a127 Rest WebService is adding "_post" to the name of my IAGController and I cant figure out why?
Vuejs code:
let path = 'http://localhost:10010/iag';
this.$http.post(path, {body: {grantType: 'bar', apiKey: 'abc', apiSecret: 'defg'}, headers: {'Content-Type': 'application/json'}})
.then(response => {
return response.json();
}).then(data => {
console.log(data);
});
Swagger:
swagger: "2.0"
info:
version: "0.0.1"
title: Hello World App
host: localhost:10010
basePath: /
schemes:
- http
- https
produces:
- application/json
x-a127-config: {}
x-a127-services: {}
paths:
/iag:
x-swagger-router-controller: IAGController
x-a127-apply: {}
post:
consumes: [application/json]
parameters:
- name: body
in: body
description: Request a secure token
required: true
schema:
$ref: "#/definitions/IAGSecurityRequest"
responses:
"200":
description: Success
schema:
# a pointer to a definition
$ref: "#/definitions/tokenResponse"
# responses may fall through to errors
default:
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
definitions:
IAGSecurityRequest:
type: object
properties:
grantType:
type: string
apiKey:
type: string
apiSecret:
type: string
ErrorResponse:
type: string
tokenResponse:
type: object
properties:
access_token:
type: string
token_type:
type: string
expires_in:
type: integer
This is a question that should be asked on a127’s repo. Unfortunately, we don’t know those products well enough to provide support for them.
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.