http://editor.swagger.io/で Cookie ベースの認証を使用する API を文書化し、テストしたいと考えています。簡単な例を挙げると、次の YAML の書き方では、/login アクションが Cookie を作成し、その Cookie を /showMySecretStuff に渡す必要があります。
swagger: '2.0'
info:
title: Test API
version: '1'
host: my.test.com
schemes:
- https
basePath: /
consumes:
- multipart/form-data
produces:
- application/json
paths:
/login:
post:
parameters:
- name: username
in: formData
required: true
type: string
- name: password
in: formData
required: true
type: string
default: secret
responses:
200:
description: OK
/showMySecretStuff:
get:
responses:
200:
description: OK