小编kev*_*c45的帖子

ArrayList过滤器

如何从Java ArrayList中过滤掉一些内容,如果你有:

  1. 你好吗
  2. 你好吗
  3. 麦克风

过滤器是"如何"它将删除乔和迈克.

java collections arraylist

38
推荐指数
4
解决办法
13万
查看次数

Swagger UI 2.1坚持"获取资源列表"

我有一个最近创建的RESTful API,我不记得几个月后如何使用它.我决定用Swagger记录我的API,但是我疯了.

我使用http://editor.swagger.io/创建了YAML文件,然后我将其转换为Swagger可以使用的JSON文件.当我将文件放入Swagger UI时,它就会陷入困境fetching resource list: localhost/swagger.json并且控制台说Uncaught TypeError: Cannot read property '$ref' of undefined .

在此输入图像描述 在此输入图像描述

我正在使用Swagger UI的2.1.0-alpha.5版本.

这是我的spec文件:

swagger: '2.0'
info:
  title: TITLE
  description: BLAH, BLAH, BLAH, ETC
  version: "1.0b"
host: api.example.com
schemes:
 - http
basePath: /v1
produces:
 - application/json
paths:
  /match.json:
    get:
     #summary: Match Data
      description: Used for getting data about a match
      parameters:
        - name: id
          in: query
          description: The match ID of from a game
          required: true
          type: integer
          format: int32
        - …

json yaml swagger swagger-ui

8
推荐指数
1
解决办法
8583
查看次数

标签 统计

arraylist ×1

collections ×1

java ×1

json ×1

swagger ×1

swagger-ui ×1

yaml ×1