Forum Discussion

atulrathod123's avatar
atulrathod123
New Member
3 years ago

How to use multiple server urls in swagger file

Hi,

 

I want to use 2 server urls in single swagger file.

The 1st server url is for this swagger file only and working fine.

But the 2nd url is not working and when I am trying to use the function "get_lookup_data" of it, its giving error.

I am new to this so sorry if my nomenclature is not the correct.

Please refer the file and see if you can suggest some inputs.

Any inputs will be a great help.

Thanks in advance.

Atul

PFB the swagger file,

 

openapi: 3.0.2
info:
title: UCL Staff Experience API (Extended Profile - Emergency Contacts)
version: v1
description: UCL Staff Experience API (Extended Profile - Emergency Contacts)
servers:
- url: https://ebscorets-dev.adcom.ucl.ac.uk:4448/webservices/rest/UclHRSSExtProfContactsApi
- url: https://ebscorets-dev.adcom.ucl.ac.uk:4448/webservices/rest/UclHRSSExtProfPerEITApi
paths:
/get_contacts/:
post:
tags:
- HRSS Personal Contacts
summary: REST API to fetch Contacts for a Person
description: REST API to fetch Contacts for a Person
requestBody:
required: true
description: HR Extended Profile Person Contacts
content:
application/json:
schema:
$ref: '#/components/schemas/P_UCL_USER_ID_INPUT'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/X_CONTACTS_DATA'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: User not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: Access forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: No identifier found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'409':
description: Failed to create
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/create_upd_contact/:
post:
tags:
- HRSS Personal Contacts
summary: REST API to create or update Contacts for a User
description: REST API to create or update Contacts for a User
requestBody:
required: true
description: HR Extended Profile Person Contacts - Create and Update
content:
application/json:
schema:
$ref: '#/components/schemas/P_CRUPD_CONTACT_INPUT'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/X_CRUPD_CONTACT_OUTPUT'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: User not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: Access forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: No identifier found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'409':
description: Failed to create
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/get_lookup_data/:
post:
tags:
- HRSS General Lookups and Value Set Values
summary: REST API to fetch FND lookup data for a lookup type, e.g., ETH_TYPE, GB_COUNTY, etc.
description: REST API to fetch FND lookup data for a lookup type, e.g., ETH_TYPE, GB_COUNTY, etc.
requestBody:
required: true
description: HR Extended Profile General
content:
application/json:
schema:
$ref: '#/components/schemas/P_LOOKUP_INPUT'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/X_LOOKUP_OUTPUT'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: User not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: Access forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: No identifier found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/error'
components:
schemas:
P_UCL_USER_ID_INPUT:
type: object
properties:
InputParameters:
properties:
P_UCL_USER_ID:
type: string
description: The UCL User ID of the logged in person
example: ccaeara
X_STANDARD_RESPONSE_OUTPUT:
type: object
properties:
X_RETURN_CODE:
type: number
description: PLSQL Return Code
X_RETURN_HTTP_STATUS:
type: number
description: HTPP Return Code
X_RETURN_MESSAGE:
type: string
description: Return Message
X_CONTACTS_DATA:
type: object
properties:
X_EMRG_CONTACTS:
type: array
description: List of Contacts Data
items:
$ref: '#/components/schemas/CONTACTS_DATA'
X_STANDARD_OUTPUT:
type: object
properties:
items:
$ref: '#/components/schemas/X_STANDARD_RESPONSE_OUTPUT'
CONTACTS_DATA:
type: object
properties:
CON_FULL_NAME:
type: string
description: Contact's Full Name
example: "Rathod, Atul"
CON_TITLE:
type: string
description: Contact's Salutation or Title
example: "MR."
CON_FIRST_NAME:
type: string
description: Contact's First Name
example: "Atul"
CON_MIDDLE_NAMES:
type: string
description: Contact's Middle Name
example: "Bharat"
CON_LAST_NAME:
type: string
description: Contact's Last Name
example: "Rathod"
CON_EMAIL_ID:
type: string
description: Contact's Email ID
example: "atulrathod@email.com"
CON_EMPLOYEE_FLAG:
type: string
description: Whether contact is an Employee of UCL
example: "N"
REATIONSHIP:
type: string
description: Relationship name
example: "Friend"
IS_EMERGENCY_CONTACT:
type: string
description: Whether contact is an Emergency Contact?
example: "Y"
PRIMARY_CONTACT_FLAG:
type: string
description: Whether contact is a Primary Contact?
example: "N"
PERSONAL_RELATIONSHIP_FLAG:
type: string
description: Whether contact has a personal relationship with user?
example: "Y"
SHARED_RESIDENCE_FLAG:
type: string
description: Whether contact shares residence with user?
example: "Y"
CON_RELATIONSHIP_ID:
type: number
description: Contact Relation ID with User - Foreign Key
example: 0
CON_TITLE_CODE:
type: string
description: Contact's Salutation or Title Code
example: "MR."
REATIONSHIP_CODE:
type: string
description: Relationship Code
example: "F"
BUSINESS_GROUP_ID:
type: number
description: Business Group ID
example: 1927
CON_ADDRESSES:
type: array
description: List of Contacts Address Data
items:
$ref: '#/components/schemas/CONTACT_ADDRESS_DATA'
CON_PHONES:
type: array
description: List of Contacts Phones Data
items:
$ref: '#/components/schemas/CONTACT_PHONES_DATA'
ORIG_PERSON_ID:
type: number
description: Person ID of User - Foreign Key
example: 0
CON_PERSON_ID:
type: number
description: Contact ID - Primary Key
example: 0
CON_OBJ_VER_NUMBER:
type: number
description: Object Version Num of Contact
example: 0
REL_OBJ_VER_NUMBER:
type: number
description: Object Version Num of Relationship
example: 0
CONTACT_ADDRESS_DATA:
type: object
properties:
ADDRESS_ID:
type: number
description: Address ID - Primary Key
example: 0
PRIMARY_FLAG:
type: string
description: Whether address is primary address?
example: "Y"
ADDRESS_TYPE_CODE:
type: string
description: Address Type Code
example: "PHCA"
ADDRESS_TYPE:
type: string
description: Address Type
example: "Primary Home Address"
ADDRESS_LINE1:
type: string
description: Address Line1
example: "Address Line1"
ADDRESS_LINE2:
type: string
description: Address Line2
example: "Address Line2"
ADDRESS_LINE3:
type: string
description: Address Line3
example: "Address Line3"
TOWN_OR_CITY:
type: string
description: Town or City
example: "Town"
COUNTY_CODE:
type: string
description: County Code
example: "CHE"
COUNTY:
type: string
description: County Name
example: "Cheshire"
POSTAL_CODE:
type: string
description: Post Code
example: "34567"
COUNTRY_CODE:
type: string
description: Country Code
example: "GB"
COUNTRY:
type: string
description: Country Name
example: "United Kingdom"
ADDR_OBJ_VER_NUMBER:
type: number
description: Address Object Version Number
example: 0
CONTACT_PHONES_DATA:
type: object
properties:
PHONE_ID:
type: number
description: Phone ID - Primary Key
example: 0
PHONE_TYPE_CODE:
type: string
description: Phone Type Code
example: "H1"
PHONE_TYPE:
type: string
description: Phone Type Name
example: "Primary Home Number"
PHONE_NUMBER:
type: string
description: Phone Number
example: "9087654321"
PHONE_IS_EDITABLE:
type: string
description: Is phone editable?
example: "Y"
PHONE_OBJ_VER_NUMBER:
type: number
description: Phone Object Version Number
example: 0
P_CRUPD_CONTACT_INPUT:
type: object
properties:
P_CRUPD_CONTACT_INPUT_DATA:
type: object
properties:
InputParameters:
properties:
P_UCL_USER_ID:
type: string
description: The UCL User ID of the logged in person
example: ccaeara
P_CON_TITLE_CODE:
type: string
description: Contact's Salutation or Title
example: "MR."
P_CON_FIRST_NAME:
type: string
description: Contact's First Name
example: "Manish"
P_CON_LAST_NAME:
type: string
description: Contact's Last Name
example: "Rathod"
P_REATIONSHIP_CODE:
type: string
description: Relationship Code
example: "F"
P_PRIMARY_CONTACT_FLAG:
type: string
description: Whether contact is a Primary Contact?
example: "N"
P_IS_EMERGENCY_CONTACT:
type: string
description: Whether contact is an Emergency Contact?
example: "Y"
P_CON_EMAIL_ID:
type: string
description: Contact's Email ID
example: "atulrathod@email.com"
P_SHARED_RESIDENCE_FLAG:
type: string
description: Whether contact shares residence with user?
example: "Y"
P_PRIMARY_ADDRESS_FLAG:
type: string
description: Whether address is primary address?
example: "Y"
P_ADDRESS_TYPE_CODE:
type: string
description: Address Type Code
example: "PHCA"
P_ADDRESS_LINE1:
type: string
description: Address Line1
example: "Address Line1"
P_ADDRESS_LINE2:
type: string
description: Address Line2
example: "Address Line2"
P_ADDRESS_LINE3:
type: string
description: Address Line3
example: "Address Line3"
P_TOWN_OR_CITY:
type: string
description: Town or City
example: "Town"
P_COUNTY_CODE:
type: string
description: County Code
example: "CHE"
P_POSTAL_CODE:
type: string
description: Post Code
example: "34567"
P_COUNTRY_CODE:
type: string
description: Country Code
example: "GB"
P_CON_PHONES:
type: object
properties:
P_CON_PHONES_ITEM:
type: array
description: List of Contacts Phones Data
items:
$ref: '#/components/schemas/CRUPD_CONTACT_PHONES_DATA'
P_ORIG_PERSON_ID:
type: number
description: Person ID of User - Foreign Key
example: 115576
P_BUSINESS_GROUP_ID:
type: number
description: Business Group ID
example: 1927
X_CON_PERSON_ID:
type: number
description: Contact ID - Primary Key (Input/Output)
example: 0
X_CON_RELATIONSHIP_ID:
type: number
description: Contact Relation ID with User - Foreign Key (Input/Output)
example: 0
X_ADDRESS_ID:
type: number
description: Address ID - Primary Key (Input/Output)
example: 0
X_CON_OBJ_VER_NUMBER:
type: number
description: Object Version Num of Contact (Input/Output)
example: 0
X_REL_OBJ_VER_NUMBER:
type: number
description: Object Version Num of Relationship (Input/Output)
example: 0
X_ADDR_OBJ_VER_NUMBER:
type: number
description: Address Object Version Number (Input/Output)
example: 0
X_CRUPD_CONTACT_OUTPUT:
type: object
properties:
X_CON_PERSON_ID:
type: number
description: Contact ID - Primary Key (Input/Output)
X_CON_RELATIONSHIP_ID:
type: number
description: Contact Relation ID with User - Foreign Key (Input/Output)
X_ADDRESS_ID:
type: number
description: Address ID - Primary Key (Input/Output)
X_CON_OBJ_VER_NUMBER:
type: number
description: Object Version Num of Contact (Input/Output)
X_REL_OBJ_VER_NUMBER:
type: number
description: Object Version Num of Relationship (Input/Output)
X_ADDR_OBJ_VER_NUMBER:
type: number
description: Address Object Version Number (Input/Output)
X_STANDARD_OUTPUT:
type: object
properties:
items:
$ref: '#/components/schemas/X_STANDARD_RESPONSE_OUTPUT'
CRUPD_CONTACT_PHONES_DATA:
type: object
properties:
PHONE_ID:
type: number
description: Phone ID - Primary Key
example: 0
PHONE_TYPE_CODE:
type: string
description: Phone Type Code
example: "H1"
PHONE_NUMBER:
type: string
description: Phone Number
example: "9087654321"
PHONE_OBJ_VER_NUMBER:
type: number
description: Phone Object Version Number
example: 0
P_LOOKUP_INPUT:
type: object
properties:
InputParameters:
properties:
P_LOOKUP_TYPE:
type: string
description: Lookup Type
example: "UCL_HR_RELIGION"
P_MATCHING_VALUE:
type: string
description: Matching valiue to narrow down list
example: ""
X_LOOKUP_OUTPUT:
type: object
properties:
X_LOOKUP_DATA:
type: array
description: List of Lookup values
items:
$ref: '#/components/schemas/VS_LOOKUPS_ARRAY'
X_STANDARD_OUTPUT:
type: object
properties:
items:
$ref: '#/components/schemas/X_STANDARD_RESPONSE_OUTPUT'
VS_LOOKUPS_ARRAY:
type: object
properties:
DESCRIPTION:
type: string
description: Lookup meaning
CODE:
type: string
description: Lookup code
error:
type: object
properties:
identifier:
type: string
example: f19e37f0-6fa8-4db1-a062-b487299beb34
description: >-
A system identifier to the support team can use to identify the
specific error.
request:
type: string
example: /foo/bar
description: The request URI which generated the error.
status:
type: object
properties:
detail:
type: string
example: >-
Error Name: A description of the error plus any remediation
steps.
description: The human readable error message.
reason:
type: string
example: API_GENERIC_ERROR
description: A machine and human readable code for the broader type of error.
lang:
type: string
example: EN
description: Language country code.

No RepliesBe the first to reply