From f3af2781745d242f338ce31703afd4a6343f2039 Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Jul 25 2019 10:41:31 +0000 Subject: Build API docs. --- diff --git a/Jenkinsfile b/Jenkinsfile index 3111215..2d51df8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -48,9 +48,27 @@ node('fedora-28') { sudo dnf install -y \ python3-sphinx \ python3-sphinxcontrib-httpdomain \ - python3-sphinxcontrib-issuetracker + python3-sphinxcontrib-issuetracker \ + gcc \ + krb5-devel \ + openldap-devel \ + python3-sphinxcontrib-httpdomain python3-pytest-cov \ + python3-flake8 python3-pylint python3-sphinx \ + python3-dogpile-cache \ + python3-fedmsg \ + python3-flask \ + python3-prometheus_client \ + python3-PyYAML \ + python3-requests \ + python3-flask-login \ + python3-flask-sqlalchemy \ + python3-ldap \ + python3-kobo \ + python3-kobo-rpmlib \ + python3-defusedxml \ + python3-tox ''' - sh 'make -C docs html' + sh 'ODCS_DEVELOPER_ENV=1 make -C docs html' archiveArtifacts artifacts: 'docs/_build/html/**' } if (scmVars.GIT_BRANCH == 'origin/master') { diff --git a/docs/api.rst b/docs/api.rst new file mode 100644 index 0000000..a17d448 --- /dev/null +++ b/docs/api.rst @@ -0,0 +1,16 @@ +=============== +Freshmaker APIs +=============== + +.. automodule:: odcs + + +.. _http-api: + +HTTP REST API +============= + +.. autoflask:: odcs.server:app + :undoc-static: + :modules: odcs.server.views + :order: path diff --git a/docs/conf.py b/docs/conf.py index b0fc7d0..a5ac582 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,6 +19,9 @@ import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))) +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../server'))) +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../common'))) +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../client'))) # -- General configuration ------------------------------------------------ diff --git a/docs/index.rst b/docs/index.rst index 763c239..2df880e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -16,6 +16,7 @@ compose (mainly the RPM repository) with packages from Koji using the REST API. about client + api Indices and tables ==================