Skip to content

Conversation

Zuiluj
Copy link
Contributor

@Zuiluj Zuiluj commented Feb 15, 2022

Changes

  • Added generate_swagger function in pfunk/project.py for generating the swagger API docs from collections that use views.
  • CLI init now accepts description and host argument to generate needed info for JSON config file

Files changed

  • pfunk/project.py
  • pfunk/cli.py
  • pfunk/tests/test_project

Documentation

The acquiring of swagger parts are as follows:

Response

Description

Acquired from the view's get_query docstrings

Status Code

Acquired from response_class class variable of a view. Error status_codes are also acquired from the class variables

Operation

HTTP Methods

Using the http_methods variable in a view

Summary

Notated as follows: ({http_method}) -> {collection_name}

Description

Docstrings of the view

Path

Endpoint

Endpoint path of the function, you can it in the url method of a view.

@Zuiluj Zuiluj self-assigned this Feb 15, 2022
@Zuiluj Zuiluj requested a review from bjinwright February 15, 2022 07:20
@@ -32,9 +32,12 @@ def load_config_file(filename):
@click.option('--email', prompt=True, help='Default From Email')
@click.option('--bucket', prompt=True, help='S3 Bucket')
@click.option('--fauna_key', prompt=True, help='Fauna Key')
@click.option('--host', prompt=True, help='Host')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add the host option to the add-stage command.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can leave description in the init command.

@@ -22,11 +22,15 @@ class StripePackage(Collection):
fields and functions to match your system.

Read and detail views are naturally public. Write operations
requires authentication from admin group.
requires authentication from admin group. While it grealty
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo "grealty" should be greatly

@bjinwright bjinwright merged commit 74c8efd into feature/api Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants