Forum Discussion

raghug's avatar
raghug
New Contributor
4 years ago

Request body example data is not coming while generating HTML

Hi,

 

After generating HTML document from swagger editor, request body example data is not generating but response values are coming:

 

here is swagger documentation:

 

openapi: 3.0.1
info:
title: "test SMS SEND"
version: v3.0
description: test api

paths:
/sms/v1.0/send:
post:
requestBody:
description: "Default Request"
content:
application/json:
schema:
$ref: "#/components/schemas/request"
responses:
"200":
description: "Default response"
content:
application/json:
schema:
$ref: "#/components/schemas/response"

components:
schemas:
request:
type: object
properties:
searchInputMetaData:
type: object
properties:
userId:
type: string
customerId:
type: string
applicationId:
type: string
correlationId:
type: string
consumingAppId:
type: string
consumerAppType:
type: string
consumerType:
type: string
testfield1:
type: string
description: Member test Id
testfield2:
type: string
description: Member test1 Id
fields:
type: array
description: list of fields
items:
properties:
fieldName:
type: string
description: field name
fieldValue:
type: string
description: field value
example:
searchInputMetaData:
userId: "test"
customerId: "test"
applicationId: "test"
correlationId: "test"
consumingAppId: "test"
consumerAppType: "test"
consumerType: "null"
testfield1: "TESTING"
testfield2: "TESTING"
fields:
- fieldName: "ScheduleDate"
fieldValue: "07/05/2021"

- fieldName: "ScheduleTime"
fieldValue: "11"

response:
type: object
properties:
SearchOutputMetaData:
type: object
properties:
respCode:
type: string
correlationId:
type: string
respMessage:
type: array
items:
type: string

transactionId:
type: string
description: test
referenceId:
type: string
description: test
smsStatus:
type: string
description: test
example:
searchOutputMetaData:
respCode: "200"
correlationId: "test"
respMessage:
- "SUCCESS"
transactionId: "1234"
referenceId: "12344"
smsStatus: "pending"

 

I also enclosed HTML file have generated (Converted to text), i see response example data has come but not request example data.

 

 

No RepliesBe the first to reply