Skip to content

Commit

Permalink
Merge pull request #3631 from didithilmy/patch-3630-Update_REST_endpo…
Browse files Browse the repository at this point in the history
…int_paths_in_docs

Documentation: Change url_prefix to match actual endpoint Fix #3630
  • Loading branch information
bari12 committed May 29, 2020
2 parents d5f76c4 + c44ebe4 commit 96c0279
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 6 deletions.
2 changes: 2 additions & 0 deletions AUTHORS.rst
Expand Up @@ -43,6 +43,7 @@ Individual contributors to the source code
- Andrew Lister <andrew.lister@stfc.ac.uk>, 2019
- Aristeidis Fkiaras <aristeidis.fkiaras@cern.ch>, 2019
- Benedikt Ziemons <benedikt.ziemons@cern.ch>, 2020
- Muhammad Aditya Hilmy <didithilmy@gmail.com>, 2020

Organisations employing contributors
------------------------------------
Expand All @@ -66,3 +67,4 @@ Organisations employing contributors
- Dwarkadas J. Sanghvi College of Engineering (India)
- Science and Technology Facilities Council (UK)
- Brookhaven National Laboratory (USA)
- Institut Teknologi Bandung (Indonesia)
12 changes: 12 additions & 0 deletions doc/source/restapi/credentials.rst
@@ -0,0 +1,12 @@
Credential Rest API
======================

**Overview**

.. qrefflask:: rucio.web.rest.flaskapi.v1.credential:make_doc()
:undoc-static:

**Details**

.. autoflask:: rucio.web.rest.flaskapi.v1.credential:make_doc()
:undoc-static:
12 changes: 12 additions & 0 deletions doc/source/restapi/exporter.rst
@@ -0,0 +1,12 @@
Exporter Rest API
======================

**Overview**

.. qrefflask:: rucio.web.rest.flaskapi.v1.exporter:make_doc()
:undoc-static:

**Details**

.. autoflask:: rucio.web.rest.flaskapi.v1.exporter:make_doc()
:undoc-static:
12 changes: 12 additions & 0 deletions doc/source/restapi/importer.rst
@@ -0,0 +1,12 @@
Importer Rest API
======================

**Overview**

.. qrefflask:: rucio.web.rest.flaskapi.v1.importer:make_doc()
:undoc-static:

**Details**

.. autoflask:: rucio.web.rest.flaskapi.v1.importer:make_doc()
:undoc-static:
2 changes: 1 addition & 1 deletion lib/rucio/web/rest/flaskapi/v1/account_limit.py
Expand Up @@ -125,7 +125,7 @@ def delete(self, account, rse):
def make_doc():
""" Only used for sphinx documentation to add the prefix """
doc_app = Flask(__name__)
doc_app.register_blueprint(bp, url_prefix='/accounts')
doc_app.register_blueprint(bp, url_prefix='/accountlimits')
return doc_app


Expand Down
2 changes: 1 addition & 1 deletion lib/rucio/web/rest/flaskapi/v1/config.py
Expand Up @@ -185,7 +185,7 @@ def put(self, section, option, value):
def make_doc():
""" Only used for sphinx documentation to add the prefix """
doc_app = Flask(__name__)
doc_app.register_blueprint(bp, url_prefix='/configs')
doc_app.register_blueprint(bp, url_prefix='/config')
return doc_app


Expand Down
2 changes: 1 addition & 1 deletion lib/rucio/web/rest/flaskapi/v1/exporter.py
Expand Up @@ -69,7 +69,7 @@ def get(self):
bp = Blueprint('export', __name__)

export_view = Export.as_view('scope')
bp.add_url_rule('', view_func=export_view, methods=['get', ])
bp.add_url_rule('/', view_func=export_view, methods=['get', ])

application = Flask(__name__)
application.register_blueprint(bp)
Expand Down
2 changes: 1 addition & 1 deletion lib/rucio/web/rest/flaskapi/v1/importer.py
Expand Up @@ -77,7 +77,7 @@ def post(self):
bp = Blueprint('import', __name__)

import_view = Import.as_view('scope')
bp.add_url_rule('', view_func=import_view, methods=['post', ])
bp.add_url_rule('/', view_func=import_view, methods=['post', ])

application = Flask(__name__)
application.register_blueprint(bp)
Expand Down
2 changes: 1 addition & 1 deletion lib/rucio/web/rest/flaskapi/v1/rule.py
Expand Up @@ -557,7 +557,7 @@ def get(self, rule_id):
def make_doc():
""" Only used for sphinx documentation to add the prefix """
doc_app = Flask(__name__)
doc_app.register_blueprint(bp, url_prefix='/rule')
doc_app.register_blueprint(bp, url_prefix='/rules')
return doc_app


Expand Down
2 changes: 1 addition & 1 deletion lib/rucio/web/rest/flaskapi/v1/temporary_did.py
Expand Up @@ -87,7 +87,7 @@ def POST(self):
def make_doc():
""" Only used for sphinx documentation to add the prefix """
doc_app = Flask(__name__)
doc_app.register_blueprint(bp, url_prefix='/temporary_dids')
doc_app.register_blueprint(bp, url_prefix='/tmp_dids')
return doc_app


Expand Down

0 comments on commit 96c0279

Please sign in to comment.