Skip to content

Conversation

@johnbaldwin
Copy link
Contributor

@johnbaldwin johnbaldwin commented Dec 6, 2020

This was my Sunday afternoon project. I wanted to see what Swagger generated docs would look like for Figures.

OpenAPI/Swagger documentation generation now included in Figures
devsite. This requires running Figures devsite in "Juniper mode" with
Python 3.8 (3.5 might work but not tested).

See the file: docs/soruce/api.rst for details

Also added some improvements to the environment settings

  • Moved the .env location to the same directory as devsite/manage.py
    isntead of being in the devsite main package.
  • Updated .env.example
  • Added more settings to be enabled by .env

See the comments in .env.example for details

@johnbaldwin johnbaldwin force-pushed the john/add-api-docs branch 2 times, most recently from 43fef9b to 3745467 Compare December 6, 2020 16:45
OpenAPI/Swagger documentation generation now included in Figures
devsite. This requires running Figures devsite in "Juniper mode" with
Python 3.8 (3.5 might work but not tested).

See the file: `docs/soruce/api.rst` for details

Also added some improvements to the environment settings

* Moved the `.env` location to the same directory as `devsite/manage.py`
isntead of being in the devsite main package.
* Updated `.env.example`
* Added more settings to be enabled by `.env`

See the comments in `.env.example` for details
OPENEDX_RELEASE=(str, 'HAWTHORN'),
FIGURES_IS_MULTISITE=(bool, False),
ENABLE_DEVSITE_CELERY=(bool, True),
ENABLE_OPENAPI_DOCS=(bool, False),
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd lean to enable it by default in devstie/settings.py but not in prod.

Suggested change
ENABLE_OPENAPI_DOCS=(bool, False),
ENABLE_OPENAPI_DOCS=(bool, True),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@OmarIthawi Sure, I'll do that after I refactor juniper requirements again so that we have only the needed packages installed for the juniper tests. And there is no "prod" for Figures devsite. Right now it is a pure dev site

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I created an issue to make a mention: #294

@johnbaldwin johnbaldwin merged commit ca42b63 into master Dec 7, 2020
@johnbaldwin johnbaldwin deleted the john/add-api-docs branch December 7, 2020 13:28
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.

3 participants