没有项目描述
restful-api-guidelines-linter的Python项目详细描述
这是一个非常基本的linter,用于检查给定的swagger规范(yaml文件) 符合Zalando’s RESTful API Guidelines。
用法:
$ sudo pip3 install -U restful-api-guidelines-linter $ restful-api-guidelines-linter my-swagger-spec.yaml -v
目前已检查以下准则:
- Must: Always Return JSON Objects As Top-Level Data Structures To Support Extensibility
- Must: Avoid Trailing Slashes
- Must: Do Not Use URI Versioning
- Must: Pluralize Resource Names
- Must: Property names must be snake_case (and never camelCase).
- Must: Use HTTP Methods Correctly
- Must: Use lowercase separate words with hyphens for Path Segments
- Must: Use snake_case (never camelCase) for Query Parameters
运行单元测试
$ sudo pip3 install -U tox $ tox