0
我使用招搖編輯器(版本2.10.5),以生成使用自定義頁眉的燒瓶中的API,並開始下面的行添加到每個路徑:招搖自動生成的燒瓶服務器頭
parameters:
- $ref: '#/parameters/X-Forwarded-Host'
的相對的定義:
X-Forwarded-Host:
name: 'X-Forwarded-Host'
in: header
description: Forwarded host header
required: true
type: string
然後運行的自動生成的燒瓶服務器
$ python3 -m swagger_server
創建一些PR oblems:
使捲曲請求時,標頭不正確的評估:
$ curl -X GET --header 'Accept: application/json' --header 'X-Forwarded-Host: example.com' http://localhost:8080
返回
health_get() missing required positional argument: 'X_Forwarded_Host'
自動生成的測試是無用太:
headers = [('X_Forwarded_Host', 'X_Forwarded_Host_example'), ...
我在做什麼錯?爲什麼swagger-editor(或codegen)將「 - 」全部設置爲「_」?
在此先感謝