From 86db69ec8d8fd8625fd49a62b90aa606baeb1a33 Mon Sep 17 00:00:00 2001 From: Nate Meyer <672246+notnmeyer@users.noreply.github.com> Date: Thu, 12 Oct 2023 08:48:01 -0700 Subject: [PATCH] add hoppscotch example --- .../go-gin/examples/hoppscotch/optic-example-collection.json | 1 + openapi-generators/go-gin/examples/hoppscotch/optic.env.json | 3 +++ openapi-generators/go-gin/optic.yml | 3 +++ 3 files changed, 7 insertions(+) create mode 100644 openapi-generators/go-gin/examples/hoppscotch/optic-example-collection.json create mode 100644 openapi-generators/go-gin/examples/hoppscotch/optic.env.json diff --git a/openapi-generators/go-gin/examples/hoppscotch/optic-example-collection.json b/openapi-generators/go-gin/examples/hoppscotch/optic-example-collection.json new file mode 100644 index 0000000..acc401d --- /dev/null +++ b/openapi-generators/go-gin/examples/hoppscotch/optic-example-collection.json @@ -0,0 +1 @@ +{"folders":[],"v":1,"requests":[{"auth":{"authActive":true,"authType":"none"},"headers":[],"body":{"contentType":null,"body":null},"params":[],"name":"/","endpoint":"<>/","preRequestScript":"","method":"GET","v":"1","testScript":""},{"auth":{"authType":"none","authActive":true},"name":"/users","preRequestScript":"","headers":[],"testScript":"","endpoint":"<>/users","method":"GET","v":"1","body":{"body":null,"contentType":null},"params":[]},{"name":"/users/create","params":[],"body":{"contentType":"application/json","body":"{\"name\": \"Hank\"}"},"method":"POST","endpoint":"<>/users/create","headers":[],"preRequestScript":"","v":"1","testScript":"","auth":{"authActive":true,"authType":"none"}}],"name":"Optic Example"} \ No newline at end of file diff --git a/openapi-generators/go-gin/examples/hoppscotch/optic.env.json b/openapi-generators/go-gin/examples/hoppscotch/optic.env.json new file mode 100644 index 0000000..116846c --- /dev/null +++ b/openapi-generators/go-gin/examples/hoppscotch/optic.env.json @@ -0,0 +1,3 @@ +{ + "URL": "http://localhost:8000" +} diff --git a/openapi-generators/go-gin/optic.yml b/openapi-generators/go-gin/optic.yml index d81a05b..c67094b 100644 --- a/openapi-generators/go-gin/optic.yml +++ b/openapi-generators/go-gin/optic.yml @@ -24,6 +24,9 @@ capture: # command: hurl examples/hurl/*.hurl # proxy_variable: HURL_OPTIC_PROXY + # run: + # command: hopp test -e examples/hoppscotch/optic.env.json examples/hoppscotch/optic-example-collection.json + # the requests below will be made by Optic and are equivalent to the requests.run examples above # send: # - path: /