I am facing an issue while generating a project in web-methods through a swagger file. The input document is created under _generated input. But when I am sending the request through postman it does not map the request with the document. Instead, it creates the elements independently. Please see the screenshots attached and let me know if there is anything that can help automatically map the elements under the object. As it is happening in the debug screen.
I have shared both screens in the attachment.
Designer Version 10.3
Webmehtod:10.3.0.0
aishvarya
(Aishvarya)
November 9, 2020, 9:34am
2
Hi Ulhaq,
Have you applied latest fixes on your 10.3 Integration Server version? If yes which ones? Could you attach the swagger file and also the request that you sent from postman?
Regards,
Aishvarya
the last fixed is shown as IS_10.3_core_fix7 and the issue is with all the swagger files.
swagger: '2.0'
info:
description: Notification
version: '1.0'
title: notifcation
termsOfService: 'http://swagger.io/terms/'
contact:
email: apiteam@swagger.io
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
host: 'abaclocalhost:5555'
basePath: /gateway/ss/1.0
schemes:
- http
paths:
/Notification:
post:
summary: send notification
description: ''
operationId: sendNotification
consumes:
- application/json
- application/xml
produces:
- application/json
parameters:
- in: body
name: body
required: false
schema:
$ref: '#/definitions/NotificationRequest'
responses:
'200':
description: sucessfull response
schema:
$ref: '#/definitions/NotificationResponse'
'400':
description: Bad request. User ID must be an integer and larger than 0.
'401':
description: Authorization information is missing or invalid.
'404':
description: A user with the specified ID was not found.
'405':
description: Invalid input
definitions:
ApplicationStatus:
type: object
properties:
code:
type: string
descriptionAR:
type: string
descriptionEN:
type: string
id:
type: integer
format: int64
xml:
name: applicationStatus
NotificationResponse:
type: object
properties:
status:
type: string
transactionId:
type: string
NotificationType:
type: object
properties:
code:
type: string
descriptionAR:
type: string
descriptionEN:
type: string
id:
type: integer
format: int64
xml:
name: NotificationType
ApplicationType:
type: object
properties:
code:
type: string
descriptionAR:
type: string
descriptionEN:
type: string
id:
type: integer
format: int64
xml:
name: ApplicationType
ApiResponse:
type: object
properties:
status:
type: string
transactionId:
type: string
NotificationCategory:
type: object
properties:
code:
type: string
descriptionAR:
type: string
descriptionEN:
type: string
id:
type: integer
format: int64
xml:
name: NotificationCategory
NotificationRequest:
type: object
properties:
applicationStatus:
$ref: '#/definitions/ApplicationStatus'
notificationType:
$ref: '#/definitions/NotificationType'
xml:
name: NotificationRequest
externalDocs:
description: Find out more about Swagger
url: 'http://swagger.io'
sample JSON
{
"applicationStatus": {
"code": "string",
"descriptionAR": "string",
"descriptionEN": "string",
"id": 0
},
"notificationType": {
"code": "string",
"descriptionAR": "string",
"descriptionEN": "string",
"id": 0
}
}
I have noticed that sub-object are coming separately some values are going inside _generated. AS per the screenshot.
aishvarya
(Aishvarya)
November 11, 2020, 6:02am
4
Hi Ulhaq,
Seems this was a bug and with the latest fix, it is resolved. You can try with latest fix.
Regards,
Aishvarya
rmg
(rmg)
November 12, 2020, 9:13pm
5
Hi Aishvarya,
Can you please mention the latest fix number applicable for v10.3 Core and it would be useful here!.
TIA,
RMG
Right, Could you please tell which is the latest fix available in which this bug was fixed, Most probably it is related to swagger import?
aishvarya
(Aishvarya)
November 17, 2020, 5:35am
7
IS_10.3_Core_Fix13 is the latest fix.
rmg
(rmg)
January 6, 2021, 7:38pm
8
Thanks for sharing the latest info
@Misbah , You may please review the latest fix and apply in your Sandbox/LLE and dry run it for proofing!
HTH,
RMG
Misbah_Ulhaq:
uest through postman it does not map the request with the document. Instead, it creates the elements independently. Please see the screenshots attached and let me know if there is anything that can help automatically map the elements under the object. As it is happening in the debug screen.
I have shared both screens in the attachment.
Misbah Ulhaq, this is a problem with the swagger file. In the parameters:body insert also the atribute “name”, like:
parameters:
- in: body
name: "NotificationRequest"
name: body
required: false
schema:
$ref: '#/definitions/NotificationRequest'
In case of a response the document, it will be generted with the name of the shema you provide ( in your case “NotificationResponse”).
system
(system)
Closed
April 22, 2021, 10:24am
10
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.