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

Create Smart API Schema Descriptions #1

Open
rpwagner opened this issue Apr 6, 2018 · 1 comment
Open

Create Smart API Schema Descriptions #1

rpwagner opened this issue Apr 6, 2018 · 1 comment

Comments

@rpwagner
Copy link

rpwagner commented Apr 6, 2018

Create a schema for the Concierge Services based on the SmartAPI schema. Try to automate this as much as possible and store the scheme in the repo, or the means to generate it as needed.

@NickolausDS
Copy link
Collaborator

This project is based on Django Rest Framework and configured to use Django Rest Swagger for documenting REST endpoints. The canonical way to add documentation for rest endpoints with these tools is through the builtin DRF tools, which provide shorthands using docstrings. For example:

class BagViewSet(viewsets.ModelViewSet):
    """
    retrieve: Get information on a previously created bag

    list: List all bags which have been created
    """ 

Currently the API Permission settings don't allow users to see ALL the REST endpoints, only read-only ones (So only GET requests). This is a bit of a problem since users can't currently login through the web interface (Making them functional with logged in users would be extra work, since the REST endpoints currently expect tokens to be passed in the request header and not stored in user models). I think making the complete API visible could be solved in two different ways: Modifying the permissions to make endpoints visible through the API, or adding an OAuth login mechanism.

I can't be certain what other business logic SmartAPI is providing. It looks like it supports hosting a generated set of API docs on their site, is this what we want?

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

No branches or pull requests

2 participants