1

我想使用外部文件中定义的 MSON 数据结构,并在我的 API 蓝图文件中引用它。可能吗?截至目前,我在同一个文件中定义了两者。

FORMAT: 1A
HOST: https://polls.apiblueprint.org/
 # Suppliers
CRUD API to Add,Query,Update and Delete Suppliers.
## Suppliers Collection [/api/v1/suppliers]
### Add a Supplier [POST /supplier]
    + Parameters
         -id : '1' (number) - The Supplier Id
         -name:  'Supplier Name' (string) - The Supplier Name
   + Response 201 (application/json)      
 ### Add multiple Suppliers [POST /suppliers]
    + Request (application/json)
         - suppliers (array[Supplier])
   + Response 201 (application/json)
  ### Get All Suppliers [GET /suppliers]
   + Response 200 (application/json)
    + Attributes 
        - suppliers (array[Supplier])
         + Response 206 (application/json)
     + Attributes 
        - suppliers (array[Supplier])
### Get Individual Suppliers [GET /suppliers/{id}]
   + Response 200 (application/json)
    + Attributes 
        - Include Supplier
      ### Update Supplier [PUT /supplier]
     + Request (application/json)
         - supplier (Supplier)
   + Response 200 (application/json)
    ### Update Suppliers [PUT /suppliers]
    + Request (application/json)
         - suppliers (array[Supplier])
   + Response 200 (application/json)
    ### Delete a Supplier [DELETE /supplier]
      + Request (application/json)
         - supplier (Supplier)
+ Response 204 (application/json)
  # Data Structures
## Supplier  (object)
- id : '1' (number) - The Supplier Id
- name :  'Supplier Name' (string) - The Supplier Name
4

0 回答 0