API Management - Swagger example not showing in API Manager but showing in SwaggerUI
Parvis Kakkar
0
Reputation points
I am using the swagger to import my data for api manager ,rest all things looks fine but the examples with nested keys are not getting displayed in azure api manager but displaying perfectly fine in swagger UI.Please Help
Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,447 questions
0
{count} votes
-
Pramod Valavala • 20,656 Reputation points • Microsoft Employee • Moderator
2023-06-15T15:06:48.7266667+00:00 @Parvis Kakkar You are likely running into an API Import Restriction documented.
Also, could you share the example (or a version of it) here for us to try out as well?
-
Parvis Kakkar • 0 Reputation points
2023-06-16T05:47:58.8633333+00:00 Hi Pramod,
Please find the attached sample for your persual,The same is working fine in swagger UI ,However when i am deploying the same over API manager the example field gets empty for the nested keys only.
{ "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "API", "description": "test" }, "servers": [ { "url": "http://localhost:3003/", "description": "Development Server", "variables": { "servername": { "default": "Development Server" } } } ], "paths": { "/reporting/api/v1/analytics/filtercallDatacdrList": { "post": { "summary": "test", "description": "Test", "tags": [ "CDR" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FilterList" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/200_filterList" } } } } } } } }, "components": { "schemas": { "FilterList": { "type": "object", "required": [ "tenant_id", "offset", "limit", "order_by", "field", "condition" ], "properties": { "tenant_id": { "type": "string", "example": "tenant_12345", "description": "A tenant ID is a unique identifier utilized to associate the data of each tenant with their specific account or instance." }, "offset": { "type": "integer", "example": 5, "description": "An offset refers to the number of items or records that are skipped over before beginning to retrieve data." }, "limit": { "type": "integer", "example": 10, "description": "Limit refers to a constraint or restriction imposed on the number of results or actions that can be obtained or performed within a system." }, "order_by": { "type": "string", "description": "An order by allows you to retrieve data in a specific order, such as by ascending/descending order.", "enum": [ "DESC", "ASC" ], "example": "DESC" }, "field": { "type": "string", "description": "Field represents a specific data element within a record.", "enum": [ "ani", "dnis", "call_direction", "call_date" ], "example": "call_date" }, "condition": { "type": "object", "properties": { "ani": { "type": "string", "description": "ANI defines the phone number of the calling party.", "example": "9098765432" }, "call_direction": { "type": "string", "description": "The direction of a call determines whether it is an incoming call or an outgoing call and empty string for both.", "enum": [ "INBOUND", "OUTBOUND", "" ], "example": "INBOUND" }, "dnis": { "type": "string", "description": "DNIS defines the phone number that was dialed by a caller.", "example": "9876234567" }, "tenant_id": { "type": "string", "example": "tenant_12345", "description": "A tenant ID is a unique identifier utilized to associate the data of each tenant with their specific account or instance." }, "call_date": { "type": "object", "description": "A call date defines the specific date for the call been placed.", "properties": { "start_date": { "type": "string", "description": "A start date defines the specific date for the call been started.", "example": "2023-01-01" }, "end_date": { "type": "string", "description": "A end date defines the specific date for the call been ended.", "example": "2023-04-01" } } } } } } }, "200_filterList": { "type": "object", "properties": { "response": { "type": "string", "example": "SUCCESS", "description": "Response defines the expected behavior and structure of the responses that clients can receive when interacting with the API." }, "message": { "type": "string", "example": "", "description": "Message represents the content that is being transmitted from the server to the client." }, "data": { "type": "object", "properties": { "result": { "type": "object", "properties": { "count": { "type": "integer", "example": 0, "description": "Count refers to the numerical value that represents the total number of items, occurrences, or entities within a specific set or group." }, "rows": { "type": "array", "items": { "type": "object", "properties": { "uid": { "type": "string", "example": "123456.789", "description": "A UID (Unique Identifier) is a string of characters that is assigned to a specific CDR or object in order to uniquely identify it." }, "ani": { "type": "string", "example": "9098765432", "description": "ANI defines the phone number of the calling party." }, "dnis": { "type": "string", "example": "9876234567", "description": "DNIS defines the phone number that was dialed by a caller." }, "call_end_time": { "type": "string", "example": "06:09:56", "description": "A end time defines the specific time for the call been ended." }, "bot_id": { "type": "string", "example": "sfsdjfds32534dvds5sdfh", "description": "The unique identifier of the bot." }, "call_direction": { "type": "string", "description": "The direction of a call determines whether it is an incoming call or an outgoing call and empty string for both.", "enum": [ "INBOUND", "OUTBOUND", "" ] }, "call_duration": { "type": "integer", "example": 10, "description": "Call duration refers to the length of time that a phone call or communication session lasts from the moment it is initiated until it is terminated. " }, "bot_name": { "type": "string", "example": "abcd", "description": "The name of the DVA(Digital Virtual Assistant)." }, "call_status": { "type": "string", "description": "Call status refers to the current state or condition of a phone call or communication session. ", "enum": [ "ANSWERED", "NO ANSWER" ] }, "call_date": { "type": "string", "example": "2023-03-29", "description": "A call date defines the specific date for the call been placed." } } } } } } } }, "error": { "type": "object", "description": "Error defines the expected behavior and structure of the error responses that clients can receive when interacting with the API.", "example": "{}" } } } } } } Screenshot from 2023-06-16 11-17-24.png
Sign in to comment
Sign in to answer