fix: Apply black formatting to resolve CI formatting issues
This commit is contained in:
@@ -112,7 +112,7 @@ class MockServerGenerator:
|
||||
|
||||
spec_info = self.spec_parser.get_info()
|
||||
|
||||
compose_content = f'''version: '3.8'
|
||||
compose_content = f"""version: '3.8'
|
||||
|
||||
services:
|
||||
mock-server:
|
||||
@@ -147,7 +147,7 @@ services:
|
||||
volumes:
|
||||
- ./:/app
|
||||
restart: unless-stopped
|
||||
'''
|
||||
"""
|
||||
|
||||
output_path.write_text(compose_content)
|
||||
return output_path
|
||||
@@ -168,7 +168,7 @@ services:
|
||||
|
||||
spec_info = self.spec_parser.get_info()
|
||||
|
||||
dockerfile_content = f'''FROM stoplight/prism:latest
|
||||
dockerfile_content = f"""FROM stoplight/prism:latest
|
||||
|
||||
LABEL maintainer="developer@example.com"
|
||||
LABEL description="Mock server for {spec_info['title']} API"
|
||||
@@ -180,7 +180,7 @@ COPY openapi.yaml .
|
||||
EXPOSE {self.DEFAULT_PORT}
|
||||
|
||||
CMD ["mock", "--spec", "openapi.yaml", "--port", "{self.DEFAULT_PORT}", "--host", "0.0.0.0"]
|
||||
'''
|
||||
"""
|
||||
|
||||
output_path.write_text(dockerfile_content)
|
||||
return output_path
|
||||
@@ -199,7 +199,7 @@ CMD ["mock", "--spec", "openapi.yaml", "--port", "{self.DEFAULT_PORT}", "--host"
|
||||
else:
|
||||
output_path = self.output_dir / "start-mock-server.sh"
|
||||
|
||||
script_content = f'''#!/bin/bash
|
||||
script_content = f"""#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
@@ -216,7 +216,7 @@ docker compose up -d mock-server
|
||||
|
||||
echo "Mock server started successfully!"
|
||||
echo "To stop: docker compose down"
|
||||
'''
|
||||
"""
|
||||
|
||||
output_path.write_text(script_content)
|
||||
output_path.chmod(0o755)
|
||||
|
||||
Reference in New Issue
Block a user