Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specmatic Generative Tests #2

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make it possible to regenerate spec from code
  • Loading branch information
emilybache committed Dec 29, 2023
commit dd566a85cc575eee5169da681395751216eba7e4
2 changes: 1 addition & 1 deletion greeting/src/greeting.py
Original file line number Diff line number Diff line change
@@ -33,6 +33,6 @@ def format_greeting(query_data):
port = 0 if "DYNAMIC_PORTS" in os.environ else 5002
if "DUMP_SCHEMA" in os.environ:
print("Writing schema file")
with open(os.path.join(os.path.dirname(__file__), "openapi.yaml"), "w") as f:
with open(os.path.join(os.path.dirname(__file__), "greeting-openapi.yaml"), "w") as f:
yaml.dump(app.spec, f)
app.run(port=port)
2 changes: 1 addition & 1 deletion newsletter/src/newsletter.py
Original file line number Diff line number Diff line change
@@ -48,6 +48,6 @@ def _get(url, params=None):
port = 0 if "DYNAMIC_PORTS" in os.environ else 5010
if "DUMP_SCHEMA" in os.environ:
print("Writing schema file")
with open(os.path.join(os.path.dirname(__file__), "openapi.yaml"), "w") as f:
with open(os.path.join(os.path.dirname(__file__), "newsletter-openapi.yaml"), "w") as f:
yaml.dump(app.spec, f)
app.run(port=port)
2 changes: 1 addition & 1 deletion users/src/users.py
Original file line number Diff line number Diff line change
@@ -35,6 +35,6 @@ def get_person_http(name):
port = 0 if "DYNAMIC_PORTS" in os.environ else 5001
if "DUMP_SCHEMA" in os.environ:
print("Writing schema file")
with open(os.path.join(os.path.dirname(__file__), "openapi.yaml"), "w") as f:
with open(os.path.join(os.path.dirname(__file__), "users-openapi.yaml"), "w") as f:
yaml.dump(app.spec, f)
app.run(port=port)