Я новичок в swagger, я понимаю концепции, но у меня возникла ошибка, когда я пытаюсь проверить концепцию "неверный отступ записи в карте", я надеюсь, что если кто-то может помочь мне найти ошибку, мне нужно знаете также, когда я работаю над большим проектом, должен ли я делать это вручную для каждого метода или когда я интегрирую сваггер с express.js, он будет сгенерирован автоматически?
swagger: '2.0'
info:
description: |
This is a sample Petstore server. You can find
out more about Swagger at
[http://swagger.io](http://swagger.io) or on
[irc.freenode.net, #swagger](http://swagger.io/irc/).
version: 1.0.0
title: Swagger ITShare Test
termsOfService: http://swagger.io/terms/
contact:
email: apiteam@swagger.io
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
# host: jsonplaceholder.typicode.com
# basePath: /
tags:
- name: posts
description: Operations about user
externalDocs:
description: Find out more about our store
url: http://swagger.io
# schemes:
# - http
paths:
/posts
get:
tags:
- posts
summary: Get POSTS
operationId: getPosts
produces:
- application/json
responses:
200:
description: successful operation
schema:
$ref: '#/definitions/Post'
400:
description: Invalid POST supplied
404:
description: User not found
definitions:
Post:
type: object
properties:
id:
type: integer
format: int64
userId :
type: integer
format: int64
title:
type: string
body:
type: string
xml:
name: User
externalDocs:
description: Find out more about Swagger
url: http://swagger.io
# Added by API Auto Mocking Plugin
host: jsonplaceholder.typicode.com
basePath: /
schemes:
- http