【发布时间】:2016-01-11 08:18:24
【问题描述】:
创建 API 时,定义无法加载到 API Store。
在 API 管理器 swagger 编辑器(图 2)和在线编辑器(图 3)中创建 swagger 定义没有任何错误。
在 API Store 的 API Console 下,它只显示 :
fetching resource list: https://10.0.2.15:9443/store/api-docs/admin/Test/1.0.0
完整的 swagger.yaml :
swagger: "2.0"
paths:
/lookup/node/insert:
post:
x-auth-type: "Application & Application User"
summary: Insert Node
tags:
- Node
x-throttling-tier: Unlimited
description: "Insert a new `Node` record."
parameters:
- in: body
description: Node object that needs to be inserted
name: body
required: true
schema:
$ref: "#/definitions/NodeInput"
responses:
"200":
description: Node successfully inserted
"400":
description: The value for Node Code and Node Description must be unique
"405":
description: Invalid input
default:
description: Unexpected error
operationId: insertNode
/lookup/node/update:
post:
x-auth-type: "Application & Application User"
summary: Update Node
tags:
- Node
x-throttling-tier: Unlimited
description: "Update an existing `Node` record"
parameters:
- in: body
description: Node object that needs to be updated
name: body
required: true
schema:
$ref: "#/definitions/NodeInput"
responses:
"200":
description: Node successfully updated
"400":
description: Specified Node does not exist
"405":
description: Invalid input
default:
description: Unexpected error
operationId: updateNode
definitions:
NodeInput:
type: object
properties:
supplierName:
description: The name of the supplier
type: string
logisticsServiceProvicerName:
description: The name of the logistics service provider
type: string
nodeCloseDate:
description: The date the node closed
format: date
type: string
nodeName:
description: The name of the node
type: string
nodeTypeIdNo:
description: Unique identifier for the node type
type: integer
username:
description: The user that last updated the record
type: string
nodeOpenDate:
description: The date the node opened
type: string
format: date
postalCode:
description: The postal code of the node
type: string
nodeConceptDesc:
description: The description of the node concept
type: string
nodeTypeDesc:
description: The description of the node type
type: string
longitude:
description: Longitude of where the node is located
type: string
nodeConceptIdNo:
description: Unique identifier for the node concept
type: integer
nodeStatusIdNo:
description: Unique identifier for the node status
type: integer
nodeCode:
description: The code to identify the node
type: string
logisticsServiceProviderCode:
description: The code to identify the logistics service provider
type: string
suburbName:
description: The name of the suburb
type: string
nodeEmail:
description: "The node's email address"
type: string
supplierCode:
description: The code to identify the supplier
type: string
addressLine4:
description: Address of the node
type: string
companyName:
description: The name of the company
type: string
addressLine3:
description: Address of the node
type: string
addressLine2:
description: Address of the node
type: string
suburbIdNo:
description: Unique identifier for the suburb
type: integer
addressLine1:
description: Address of the node
type: string
companyCode:
description: The code to identify the company
type: string
nodeTelephone:
description: The telephone number of the node
type: string
latitude:
description: Latitude of where the node is located
type: string
nodeStatusDesc:
description: The description of the node status
type: string
info:
title: Test
version: 1.0.0
【问题讨论】:
-
网页控制台报错:TypeError: Argument 1 of XMLSerializer.serializeToString does not implement interface Node.
标签: api wso2 swagger swagger-ui wso2-am