-
Notifications
You must be signed in to change notification settings - Fork 86
Using Optic Capture with HAR
optic capture
generates and updates OpenAPI specs based on real traffic. Most teams use their integration tests as a traffic source. Optic also has built-in support for reading HAR 1.1 and 1.2 dumps
Note on performance: you should not run huge volumes of production traffic through this command. Performance degrades markedly after 100MB. If you really need to reverse engineer an API from a large volume of traffic, chunk it. This shouldn't be something you do over and over again on the same service.
optic capture openapi.yml --har ./file.har
Learning path patterns for unmatched requests... Documenting new operations: ✔ GET / ✔ GET /users ✔ POST /users/create
$ optic capture openapi.yml --har ./file.har ✔ GET / ✓ 200 response ✔ GET /users ✓ 200 response ✔ POST /users/create ✓ 201 response
Generate OpenAPI from Traffic
Using Optic Capture with Tests
Using Optic Capture with Postman
Breaking Change and Style Checks