Skip to content

Commit

Permalink
Revert change to example
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelboulton committed Jan 20, 2024
1 parent f80f109 commit 7c6e648
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions example/generate_from_openapi/pub_tavern.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sys
from urllib.parse import urlparse

import yaml
from coreapi import Client


Expand Down Expand Up @@ -38,6 +39,7 @@ def output_yaml(links, prefix=""):

test_dict["stages"] = [inner_dict]
# print(test_dict)
print(yaml.dump(test_dict, explicit_start=True, default_flow_style=False))


def get_request_placeholders(fields):
Expand All @@ -63,6 +65,10 @@ def get_name(prefix, test_name, action, url):


def display_help():
print("pub_tavern.py <url to openapi.json>")
print(
"eg: pub_tavern.py https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/json/petstore-simple.json"
)
sys.exit(-1)


Expand Down

0 comments on commit 7c6e648

Please sign in to comment.