What could be causing the error "http: body field path 'foo' must be a non-repeated message" when deploying the configuration to GCP API Gateway with the following api-spec.yaml?
I've read documentation swagger 2.0 and I think there's no issue here. I check through swagger editor to check if there is any error but no error regarding error mentioned above.
swagger: '2.0'
info:
title: API Gateway
version: 1.0.0
description: API Gateway
schemes:
- https
produces:
- application/json
securityDefinitions:
firebase:
scopes: {}
authorizationUrl: ''
flow: implicit
type: oauth2
x-google-issuer: 'https://securetoken.google.com/project-id'
x-google-jwks_uri: 'https://www.googleapis.com/service_accounts/v1/metadata/x509/securetoken@system.gserviceaccount.com'
paths:
'/v1/events/{id}/tickets':
get:
produces:
- application/json
parameters:
- in: path
name: id
required: true
type: string
responses:
'200':
description: ''
schema:
items:
properties:
description:
type: string
donationPurpose:
type: string
endDate:
format: date-time
type: string
endTime:
type: string
eventId:
type: string
freeTicketType:
enum:
- donation
- infaq
- none
type: string
id:
type: string
name:
type: string
price:
type: number
startDate:
format: date-time
type: string
startTime:
type: string
totalAvailableTickets:
type: number
totalTickets:
type: number
type:
enum:
- free
- paid
type: string
required:
- id
- eventId
- name
- description
- type
- freeTicketType
- donationPurpose
- totalAvailableTickets
- totalTickets
- price
- startDate
- endDate
- startTime
- endTime
type: object
type: array
security:
- firebase: []
tags:
- events
operationId: EventController_getTicketsByEvent
summary: Get event tickets
x-google-backend:
address: 'https://backend-et.a.run.app/v1/events/{id}/tickets'
post:
consumes:
- application/json
parameters:
- in: path
name: id
required: true
type: string
- in: body
name: tikets
required: true
schema:
items:
type: string
type: array
responses:
'200':
description: ''
security:
- firebase: []
tags:
- events
operationId: EventController_createTicket
summary: Create event tickets
x-google-backend:
address: 'https://backend-et.a.run.app/v1/events/{id}/tickets'
put:
consumes:
- application/json
produces:
- application/json
parameters:
- in: path
name: id
required: true
type: string
- in: body
name: updateTickets
required: true
schema:
items:
type: string
type: array
responses:
'200':
description: ''
'404':
description: ''
schema:
properties:
error:
properties:
data:
type: object
details:
type: object
errorCode:
type: number
errorName:
type: string
localizedMessage:
type: string
message:
type: string
path:
type: string
requestId:
type: string
status:
type: string
timestamp:
type: string
required:
- status
- errorCode
- message
- errorName
- details
- path
- requestId
- timestamp
- data
type: object
required:
- error
type: object
security:
- firebase: []
tags:
- events
operationId: EventController_updateTicket
summary: Update event tickets
x-google-backend:
address: 'https://backend-et.a.run.app/v1/events/{id}/tickets'
Explanation why it is happening? What should my yaml looks like?