Skip to content

Commit c11d587

Browse files
author
Nahuel Alonso
committed
Swagger white
1 parent 2e4d59e commit c11d587

File tree

10 files changed

+10651
-17
lines changed

10 files changed

+10651
-17
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"level": "community",
3+
"md": "Add Swagger view"
4+
}

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ include faraday/server/default.ini
66
include requirements.txt
77
include requirements_dev.txt
88
include faraday/server/commands/templates/nginx_config.j2
9+
include faraday/openapi/faraday_swagger.json

faraday/manage.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,9 @@ def show_urls():
7575

7676

7777
@click.command(help="Show all URLs in OPENAPI format")
78-
@click.option('--no-servers', default=False, is_flag=True,
79-
help="Avoids adding servers tag")
80-
@click.option('--server', required=False, prompt=False, default="localhost",
81-
help="Server host/ip where to test api docs.")
82-
def openapi_yaml(server, no_servers):
83-
openapi_format(format="yaml", server=server, no_servers=no_servers)
78+
@click.argument('server', required=True, default="http://localhost:5985")
79+
def openapi_swagger(server):
80+
openapi_format(server=server)
8481

8582

8683
@click.command(help="Import Vulnerability templates")
@@ -302,7 +299,7 @@ def settings(action, data, name):
302299
cli.add_command(delete_custom_field)
303300
cli.add_command(list_plugins)
304301
cli.add_command(rename_user)
305-
cli.add_command(openapi_yaml)
302+
cli.add_command(openapi_swagger)
306303
cli.add_command(generate_nginx_config)
307304
cli.add_command(import_vulnerability_templates)
308305
cli.add_command(settings)

0 commit comments

Comments
 (0)