Swagger / Open API does not deploy

1,511 views
Skip to first unread message

in...@shopline.se

unread,
May 10, 2017, 2:37:12 PM5/10/17
to Google Cloud Endpoints
What do I need to do to get this simple example to work in Google Endpoints?


Tried for 2 hours now.

$ gcloud service-management deploy swagger.yaml
ERROR
: unknown location: http: body field path 'body' must be a non-repeated message.


Wesley Wong

unread,
May 10, 2017, 2:40:28 PM5/10/17
to in...@shopline.se, Google Cloud Endpoints
Hi,

Endpoints does not support everything specified in the OpenAPI spec. This is why you are getting this error.

If you are trying to get a sample working in Endpoints, you can take a look at the Quickstarts:

Thanks,
Wesley

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/39e23d88-9627-4084-9b03-ce480b636239%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

in...@shopline.se

unread,
May 10, 2017, 2:47:10 PM5/10/17
to Google Cloud Endpoints, in...@shopline.se
Well that is too bad.

And the tutorial is not very helpful. I already tried it.

Where is your compatible working sample "openapi.yaml" file?

It is not in the PHP repository.

$ find . -name openapi.yaml
$




Den onsdag 10 maj 2017 kl. 20:40:28 UTC+2 skrev Wesley Wong:
Hi,

Endpoints does not support everything specified in the OpenAPI spec. This is why you are getting this error.

If you are trying to get a sample working in Endpoints, you can take a look at the Quickstarts:

Thanks,
Wesley

On Wed, May 10, 2017 at 11:37 AM <in...@shopline.se> wrote:
What do I need to do to get this simple example to work in Google Endpoints?


Tried for 2 hours now.

$ gcloud service-management deploy swagger.yaml
ERROR
: unknown location: http: body field path 'body' must be a non-repeated message.


--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.

in...@shopline.se

unread,
May 10, 2017, 2:56:56 PM5/10/17
to Google Cloud Endpoints, in...@shopline.se
Ok I found the sample file now. It was in another PHP repo (not the getting started one I downloaded earlier).

Hope to see more support for the spec in the future.

Will try this again.

tabassu...@eshopbox.com

unread,
Jan 9, 2020, 1:59:46 AM1/9/20
to Google Cloud Endpoints
In Java , the body variable name passing in the endpoint cannot be same . Change the name of the variable passed as body in the POST request in the same endpoint.

Vishal T

unread,
Jan 9, 2020, 2:07:56 AM1/9/20
to Google Cloud Endpoints

operationId is an optional unique string used to identify an operation. If provided, these IDs must be unique among all operations described in your API.


Please refer the following example i hope it will help you

/users:
  get:
    operationId: getUsers
    summary: Gets all users
    ...
  post:
    operationId: addUser
    summary: Adds a new user
    ...
/user/{id}:
  get:
    operationId: getUserById
    summary: Gets a user by user ID
    ...

ign...@gmail.com

unread,
Jan 9, 2020, 4:04:45 AM1/9/20
to Google Cloud Endpoints
Thanks for the 3 year old reply.

I already moved on to another cloud provider (AWS) since you couldn't make working example with the OFFICIAL swagger example file.

Maybe next year we can look at gcloud again if it is fixed by then.
Reply all
Reply to author
Forward
0 new messages