@@ -407,6 +407,9 @@ paths:
407407 application/json :
408408 schema :
409409 $ref : ' #/components/schemas/SMSProviderList'
410+ examples :
411+ ListOfSMSProviderResponseExample :
412+ $ref : ' #/components/examples/SMSProvidersListResponseExample'
410413 " 400 " :
411414 description : Bad Request
412415 content :
@@ -457,25 +460,27 @@ paths:
457460 application/json :
458461 schema :
459462 $ref : ' #/components/schemas/SMSSenderAdd'
460- example :
461- provider : NEXMO
462- providerURL : https://rest.nexmo.com/sms/json
463- key : 123**45
464- secret : 5tg**ssd
465- sender : +94 775563324
466- type : json
467- properties :
468- - key : body.scope
469- value : " internal"
470- - key : http.headers
471- value : " X-Version: 1, Authorization: bearer ,Accept: application/json ,Content-Type: application/json"
463+ examples :
464+ TwilioSMSProviderRequestExample :
465+ $ref : ' #/components/examples/TwilioSMSProviderRequestExample'
466+ VonageSMSProviderRequestExample :
467+ $ref : ' #/components/examples/VonageSMSProviderRequestExample'
468+ CustomSMSProviderRequestExample :
469+ $ref : ' #/components/examples/CustomSMSProviderRequestExample'
472470 responses :
473471 " 201 " :
474472 description : Successful Response
475473 content :
476474 application/json :
477475 schema :
478476 $ref : ' #/components/schemas/SMSSender'
477+ examples :
478+ TwilioSMSProviderResponseExample :
479+ $ref : ' #/components/examples/TwilioSMSProviderResponseExample'
480+ VonageSMSProviderResponseExample :
481+ $ref : ' #/components/examples/VonageSMSProviderResponseExample'
482+ CustomSMSProviderResponseExample :
483+ $ref : ' #/components/examples/CustomSMSProviderResponseExample'
479484 " 400 " :
480485 description : Bad Request
481486 content :
@@ -563,6 +568,13 @@ paths:
563568 application/json :
564569 schema :
565570 $ref : ' #/components/schemas/SMSSender'
571+ examples :
572+ TwilioSMSProviderResponseExample :
573+ $ref : ' #/components/examples/TwilioSMSProviderResponseExample'
574+ VonageSMSProviderResponseExample :
575+ $ref : ' #/components/examples/VonageSMSProviderResponseExample'
576+ CustomSMSProviderResponseExample :
577+ $ref : ' #/components/examples/CustomSMSProviderResponseExample'
566578 " 400 " :
567579 description : Bad Request
568580 content :
@@ -623,18 +635,13 @@ paths:
623635 application/json :
624636 schema :
625637 $ref : ' #/components/schemas/SMSSenderUpdateRequest'
626- example :
627- provider : NEXMO
628- providerURL : https://rest.nexmo.com/sms/json
629- key : 123**45
630- secret : 5tg**ssd
631- sender : +94 775563324
632- type : json
633- properties :
634- - key : body.scope
635- value : " internal"
636- - key : http.headers
637- value : " X-Version: 1, Authorization: bearer ,Accept: application/json ,Content-Type: application/json"
638+ examples :
639+ TwilioSMSProviderRequestExample :
640+ $ref : ' #/components/examples/TwilioSMSProviderRequestExample'
641+ VonageSMSProviderRequestExample :
642+ $ref : ' #/components/examples/VonageSMSProviderRequestExample'
643+ CustomSMSProviderRequestExample :
644+ $ref : ' #/components/examples/CustomSMSProviderRequestExample'
638645 required : true
639646 responses :
640647 " 200 " :
@@ -643,6 +650,13 @@ paths:
643650 application/json :
644651 schema :
645652 $ref : ' #/components/schemas/SMSSender'
653+ examples :
654+ TwilioSMSProviderResponseExample :
655+ $ref : ' #/components/examples/TwilioSMSProviderResponseExample'
656+ VonageSMSProviderResponseExample :
657+ $ref : ' #/components/examples/VonageSMSProviderResponseExample'
658+ CustomSMSProviderResponseExample :
659+ $ref : ' #/components/examples/CustomSMSProviderResponseExample'
646660 " 400 " :
647661 description : Bad Request
648662 content :
@@ -1192,6 +1206,8 @@ components:
11921206 secret :
11931207 type : string
11941208 example : 5tg**ssd
1209+ authentication :
1210+ $ref : ' #/components/schemas/Authentication'
11951211 sender :
11961212 type : string
11971213 example : +94 775563324
@@ -1282,6 +1298,8 @@ components:
12821298 sender :
12831299 type : string
12841300 example : +94 775563324
1301+ authentication :
1302+ $ref : ' #/components/schemas/Authentication'
12851303 contentType :
12861304 type : string
12871305 enum :
@@ -1334,6 +1352,8 @@ components:
13341352 secret :
13351353 type : string
13361354 example : 5tg**ssd
1355+ authentication :
1356+ $ref : ' #/components/schemas/Authentication'
13371357 sender :
13381358 type : string
13391359 example : +94 775563324
@@ -1397,6 +1417,67 @@ components:
13971417 id :
13981418 type : integer
13991419 format : int64
1420+ Authentication :
1421+ type : object
1422+ description : >
1423+ The type of authentication required by the action's endpoint. The following options are supported:
1424+
1425+ - CLIENT_CREDENTIAL: Client credential authentication.<br>
1426+ ``{
1427+ "type": "CLIENT_CREDENTIAL",
1428+ "properties": {
1429+ "clientId": "3e172dd2-901b-43a9-a26a-728466795f01",
1430+ "clientSecret": "83cdc120-ccf6-4163-a4a8-c1ba3e872daa",
1431+ "tokenEndpoint": "https://custom.sms.provider/auth/token",
1432+ "scopes": "send_scope"
1433+ }
1434+ }``
1435+ - BASIC: Username and password based authentication.<br>
1436+ ``{
1437+ "type": "BASIC",
1438+ "properties": {
1439+ "username": "admin",
1440+ "password": "admin123"
1441+ }
1442+ }``
1443+ - BEARER: Token based based authentication.<br>
1444+ ``{
1445+ "type": "BEARER",
1446+ "properties": {
1447+ "token": "83cdc120-ccf6-4163-a4a8-c1ba3e872daa"
1448+ }
1449+ }``
1450+ - API_KEY: API key secret based authentication.<br>
1451+ ``{
1452+ "type": "API_KEY",
1453+ "properties": {
1454+ "header": "auth",
1455+ "value": "123ert45"
1456+ }
1457+ }``
1458+ required :
1459+ - type
1460+ properties :
1461+ type :
1462+ type : string
1463+ enum :
1464+ - CLIENT_CREDENTIAL
1465+ - BASIC
1466+ - BEARER
1467+ - API_KEY
1468+ - NONE
1469+ example : CLIENT_CREDENTIAL
1470+ properties :
1471+ type : object
1472+ description : Authentication properties specific to the selected type.
1473+ additionalProperties : true
1474+ example :
1475+ type : CLIENT_CREDENTIAL
1476+ properties :
1477+ clientId : 3e172dd2-901b-43a9-a26a-728466795f01
1478+ clientSecret : 83cdc120-ccf6-4163-a4a8-c1ba3e872daa
1479+ tokenEndpoint : https://custom.sms.provider/auth/token
1480+ scopes : send_scope
14001481 parameters :
14011482 typeQueryParam :
14021483 name : type
@@ -1409,6 +1490,9 @@ components:
14091490 schema :
14101491 type : string
14111492 securitySchemes :
1493+ BasicAuth :
1494+ type : http
1495+ scheme : basic
14121496 OAuth2 :
14131497 type : oauth2
14141498 flows :
@@ -1515,3 +1599,134 @@ components:
15151599 value : " Identity Server"
15161600 - key : " userName"
15171601 value : " iam"
1602+ TwilioSMSProviderRequestExample :
1603+ summary : Post and PUT request for Twilio SMS Provider
1604+ value :
1605+ provider : Twilio
1606+ sender : +94 775563324
1607+ type : json
1608+ properties :
1609+ - key : body.scope
1610+ value : " internal"
1611+ - key : http.headers
1612+ value : " X-Version: 1, Accept: application/json, Content-Type: application/json"
1613+ authentication :
1614+ type : BASIC
1615+ properties :
1616+ username : " 123ert45"
1617+ password : " 5tg-rts-ssd"
1618+ VonageSMSProviderRequestExample :
1619+ summary : Post and PUT request for Vonage SMS Provider
1620+ value :
1621+ provider : Vonage
1622+ sender : +94 775563324
1623+ type : json
1624+ properties :
1625+ - key : body.scope
1626+ value : " internal"
1627+ - key : http.headers
1628+ value : " X-Version: 1, Accept: application/json, Content-Type: application/json"
1629+ authentication :
1630+ type : BASIC
1631+ properties :
1632+ username : " 123ert45"
1633+ password : " 5tg-rts-ssd"
1634+ CustomSMSProviderRequestExample :
1635+ summary : Post and PUT request for Custom SMS Provider
1636+ value :
1637+ provider : Custom
1638+ sender : +94 775563324
1639+ type : json
1640+ properties :
1641+ - key : body.scope
1642+ value : " internal"
1643+ - key : http.headers
1644+ value : " X-Version: 1, Accept: application/json, Content-Type: application/json"
1645+ authentication :
1646+ type : CLIENT_CREDENTIAL
1647+ properties :
1648+ clientId : 3e172dd2-901b-43a9-a26a-728466795f01
1649+ clientSecret : 83cdc120-ccf6-4163-a4a8-c1ba3e872daa
1650+ tokenEndpoint : https://custom.sms.provider/auth/token
1651+ scopes : send_scope
1652+ TwilioSMSProviderResponseExample :
1653+ summary : Response for Twilio SMS Provider
1654+ value :
1655+ name : SMSPublisher
1656+ provider : Twilio
1657+ key : 123ert45
1658+ secret : 5tg-rts-ssd
1659+ sender : +94 775563324
1660+ type : json
1661+ properties :
1662+ - key : body.scope
1663+ value : " internal"
1664+ - key : http.headers
1665+ value : " X-Version: 1, Accept: application/json, Content-Type: application/json"
1666+ authentication :
1667+ type : BASIC
1668+ properties :
1669+ username : " 123ert45"
1670+ password : " 5tg-rts-ssd"
1671+ VonageSMSProviderResponseExample :
1672+ summary : Response for Vonage SMS Provider
1673+ value :
1674+ name : SMSPublisher
1675+ provider : Vonage
1676+ key : 123ert45
1677+ secret : 5tg-rts-ssd
1678+ sender : +94 775563324
1679+ type : json
1680+ properties :
1681+ - key : body.scope
1682+ value : " internal"
1683+ - key : http.headers
1684+ value : " X-Version: 1, Accept: application/json, Content-Type: application/json"
1685+ authentication :
1686+ type : BASIC
1687+ properties :
1688+ username : " 123ert45"
1689+ password : " 5tg-rts-ssd"
1690+ CustomSMSProviderResponseExample :
1691+ summary : Response for Custom SMS Provider
1692+ description : This document specifies a **RESTful API** for **WSO2 Identity Server Notification Senders**
1693+ value :
1694+ name : SMSPublisher
1695+ provider : Custom
1696+ key : " "
1697+ secret : " "
1698+ sender : +94 775563324
1699+ type : json
1700+ properties :
1701+ - key : body.scope
1702+ value : " internal"
1703+ - key : http.headers
1704+ value : " X-Version: 1, Accept: application/json, Content-Type: application/json"
1705+ authentication :
1706+ type : CLIENT_CREDENTIAL
1707+ properties :
1708+ clientId : 3e172dd2-901b-43a9-a26a-728466795f01
1709+ clientSecret : 83cdc120-ccf6-4163-a4a8-c1ba3e872daa
1710+ tokenEndpoint : https://custom.sms.provider/auth/token
1711+ scopes : send_scope
1712+ SMSProvidersListResponseExample :
1713+ summary : Response for list of SMS Provider
1714+ value :
1715+ - name : SMSPublisher
1716+ provider : Custom
1717+ key : " "
1718+ secret : " "
1719+ sender : +94 775563324
1720+ type : json
1721+ properties :
1722+ - key : body.scope
1723+ value : " internal"
1724+ - key : http.headers
1725+ value : " X-Version: 1, Accept: application/json, Content-Type: application/json"
1726+ authentication :
1727+ type : CLIENT_CREDENTIAL
1728+ properties :
1729+ clientId : 3e172dd2-901b-43a9-a26a-728466795f01
1730+ clientSecret : 83cdc120-ccf6-4163-a4a8-c1ba3e872daa
1731+ tokenEndpoint : https://custom.sms.provider/auth/token
1732+ scopes : send_scope
0 commit comments