-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Closed
Labels
clarificationrequests to clarify, but not change, part of the specrequests to clarify, but not change, part of the specparam serializationIssues related to parameter and/or header serializationIssues related to parameter and/or header serialization
Milestone
Description
Hello,
I need some help on mixed type array with array of objects in path location. I have defined following schema in yaml file
openapi: 3.0.3
info:
title: API
version: 1.0.0
paths:
"/{param1}":
get:
parameters:
- name: param1
in: path
required: true
style: label
explode: false
schema:
type: array
items:
oneOf:
- $ref: "#/components/schemas/PetByAge"
- $ref: "#/components/schemas/PetByType"
example:
- age: 10
nickname: john
- pet_type: sth
hunts: false
responses:
"200":
description: OK
components:
schemas:
PetByAge:
type: object
properties:
age:
type: integer
nickname:
type: string
PetByType:
type: object
properties:
pet_type:
type: string
hunts:
type: boolean
I used swagger editor to get request URL (GET operation) containing parameter in path location, swagger generated request URL which looks not meaningful and confusing as it contains string "[object]" as a parameter i.e http://10.240.185.191/path/.[object Object].[object Object]
can someone let me know how array of object parameters would be serialized in path location (i.e in URL) in request, so that I can deserialize at server side
Metadata
Metadata
Assignees
Labels
clarificationrequests to clarify, but not change, part of the specrequests to clarify, but not change, part of the specparam serializationIssues related to parameter and/or header serializationIssues related to parameter and/or header serialization