Skip to content

Commit 0dc1c3c

Browse files
authored
Merge pull request #332 from EtiennePelletier/update_doc_links
Update broken/outdated documentation links. contrib: EtiennePelletier reviewer: j5awry
2 parents 8a01bc7 + 17fd571 commit 0dc1c3c

File tree

15 files changed

+33
-31
lines changed

15 files changed

+33
-31
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EditorConfig is awesome: http://EditorConfig.org
1+
# EditorConfig is awesome: https://EditorConfig.org
22

33
# top-most EditorConfig file
44
root = true

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ You need to install some dependencies to develop on flask-restx:
5050
5151
$ pip install -e .[dev]
5252
53-
An [Invoke](http://www.pyinvoke.org/) ``tasks.py`` is provided to simplify the common tasks:
53+
An `Invoke <https://www.pyinvoke.org/>`_ ``tasks.py`` is provided to simplify the common tasks:
5454

5555
.. code-block:: console
5656

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ Documentation
175175
The documentation is hosted `on Read the Docs <http://flask-restx.readthedocs.io/en/latest/>`_
176176

177177

178-
.. _Flask: http://flask.pocoo.org/
179-
.. _Swagger: http://swagger.io/
178+
.. _Flask: https://flask.palletsprojects.com/
179+
.. _Swagger: https://swagger.io/
180180

181181

182182
Contribution

doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ BUILDDIR = _build
99

1010
# User-friendly check for sphinx-build
1111
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12-
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
12+
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://sphinx-doc.org/)
1313
endif
1414

1515
# Internal variables.

doc/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@
332332

333333

334334
intersphinx_mapping = {
335-
"flask": ("http://flask.pocoo.org/docs/", None),
336-
"python": ("http://docs.python.org/", None),
337-
"werkzeug": ("http://werkzeug.pocoo.org/docs/", None),
335+
"flask": ("https://flask.palletsprojects.com/", None),
336+
"python": ("https://docs.python.org/", None),
337+
"werkzeug": ("https://werkzeug.palletsprojects.com/", None),
338338
}

doc/errors.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ that you can do with Flask/Blueprint :meth:`@errorhandler <flask:flask.Flask.err
141141
@api.errorhandler(RootException)
142142
def handle_root_exception(error):
143143
'''Return a custom message and 400 status code'''
144-
return {'message': 'What you want'}, 400
145-
144+
return {'message': 'What you want'}, 400
145+
146146
147147
@api.errorhandler(CustomException)
148148
def handle_custom_exception(error):
@@ -160,14 +160,14 @@ that you can do with Flask/Blueprint :meth:`@errorhandler <flask:flask.Flask.err
160160
def handle_fake_exception_with_header(error):
161161
'''Return a custom message and 400 status code'''
162162
return {'message': error.message}, 400, {'My-Header': 'Value'}
163-
164-
163+
164+
165165
@api.errorhandler(NoResultFound)
166166
def handle_no_result_exception(error):
167167
'''Return a custom not found error message and 404 status code'''
168-
return {'message': error.specific}, 404
169-
170-
168+
return {'message': error.specific}, 404
169+
170+
171171
.. note ::
172172
173173
A "NoResultFound" error with description is required by the OpenAPI 2.0 spec. The docstring in the error handle function is output in the swagger.json as the description.

doc/example.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Full example
22
============
33

4-
Here is a full example of a `TodoMVC <http://todomvc.com/>`_ API.
4+
Here is a full example of a `TodoMVC <https://todomvc.com/>`_ API.
55

66
.. code-block:: python
77

doc/make.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if errorlevel 9009 (
5656
echo.may add the Sphinx directory to PATH.
5757
echo.
5858
echo.If you don't have Sphinx installed, grab it from
59-
echo.http://sphinx-doc.org/
59+
echo.https://sphinx-doc.org/
6060
exit /b 1
6161
)
6262

doc/parsing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Request Parsing
88
The whole request parser part of Flask-RESTX is slated for removal and
99
will be replaced by documentation on how to integrate with other packages
1010
that do the input/output stuff better
11-
(such as `marshmallow <http://marshmallow.readthedocs.org>`_).
11+
(such as `marshmallow <https://marshmallow.readthedocs.io/>`_).
1212
This means that it will be maintained until 2.0 but consider it deprecated.
1313
Don't worry, if you have code using that now and wish to continue doing so,
1414
it's not going to go away any time too soon.

doc/quickstart.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Quick start
55

66
.. currentmodule:: flask_restx
77

8-
This guide assumes you have a working understanding of `Flask <http://flask.pocoo.org>`_,
8+
This guide assumes you have a working understanding of `Flask <https://flask.palletsprojects.com/>`_,
99
and that you have already installed both Flask and Flask-RESTX.
1010
If not, then follow the steps in the :ref:`installation` section.
1111

@@ -23,13 +23,15 @@ All you need to do is update your requirements to use Flask-RESTX instead of
2323
Flask-RESTPlus. Then you need to update all your imports.
2424
This can be done using something like:
2525

26-
::
26+
.. code-block:: bash
27+
2728
find . -type f -name "*.py" | xargs sed -i "s/flask_restplus/flask_restx/g"
2829
2930
Finally, you will need to update your configuration options (described `here
30-
<quickstart.html#configuration>`_). Example:
31+
<configuration.html>`_). Example:
32+
33+
.. code-block:: bash
3134
32-
::
3335
find . -type f -name "*.py" | xargs sed -i "s/RESTPLUS_/RESTX_/g"
3436
3537
@@ -82,7 +84,7 @@ A minimal Flask-RESTX API looks like this:
8284
8385
8486
Save this as api.py and run it using your Python interpreter.
85-
Note that we've enabled `Flask debugging <http://flask.pocoo.org/docs/quickstart/#debug-mode>`_
87+
Note that we've enabled `Flask debugging <https://flask.palletsprojects.com/quickstart/#debug-mode>`_
8688
mode to provide code reloading and better error messages.
8789

8890
.. code-block:: console
@@ -112,7 +114,7 @@ See :ref:`swaggerui` for a complete documentation on the automatic documentation
112114
Resourceful Routing
113115
-------------------
114116
The main building block provided by Flask-RESTX are resources.
115-
Resources are built on top of :ref:`Flask pluggable views <flask:views>`,
117+
Resources are built on top of :doc:`Flask pluggable views <flask:views>`,
116118
giving you easy access to multiple HTTP methods just by defining methods on your resource.
117119
A basic CRUD resource for a todo application (of course) looks like this:
118120

@@ -152,7 +154,7 @@ You can try it like this:
152154
{"todo2": "Change my brakepads"}
153155
154156
155-
Or from python if you have the `Requests <http://docs.python-requests.org/>`_ library installed:
157+
Or from python if you have the `Requests <https://docs.python-requests.org/>`_ library installed:
156158

157159
.. code-block:: python
158160

doc/scaling.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Here's an example directory structure::
3838

3939

4040
The `app` module will serve as a main application entry point following one of the classic
41-
Flask patterns (See :ref:`flask:larger-applications` and :ref:`flask:app-factories`).
41+
Flask patterns (See :doc:`flask:patterns/packages` and :doc:`flask:patterns/appfactories`).
4242

4343
The `core` module is an example, it contains the business logic.
4444
In fact, you call it whatever you want, and there can be many packages.
@@ -151,7 +151,7 @@ Using this pattern, you simply have to register your API in `app.py` like that:
151151
Use With Blueprints
152152
-------------------
153153

154-
See :ref:`blueprints` in the Flask documentation for what blueprints are and why you should use them.
154+
See :doc:`flask:blueprints` in the Flask documentation for what blueprints are and why you should use them.
155155
Here's an example of how to link an :class:`Api` up to a :class:`~flask.Blueprint`.
156156

157157
.. code-block:: python

doc/swagger.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,4 +1067,4 @@ To disable Swagger UI entirely, set ``doc=False``:
10671067
api = Api(app, doc=False)
10681068
10691069
1070-
.. _vendor extensions: http://swagger.io/specification/#specification-extensions-128
1070+
.. _vendor extensions: https://swagger.io/specification/#specification-extensions

flask_restx/cors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def crossdomain(
1717
credentials=False,
1818
):
1919
"""
20-
http://flask.pocoo.org/snippets/56/
20+
https://web.archive.org/web/20190128010149/http://flask.pocoo.org/snippets/56/
2121
"""
2222
if methods is not None:
2323
methods = ", ".join(sorted(x.upper() for x in methods))

flask_restx/swagger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ def vendor_fields(self, doc, method):
480480
"""
481481
Extract custom 3rd party Vendor fields prefixed with ``x-``
482482
483-
See: http://swagger.io/specification/#specification-extensions-128
483+
See: https://swagger.io/specification/#specification-extensions
484484
"""
485485
return dict(
486486
(k if k.startswith("x-") else "x-{0}".format(k), v)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# replace doc references
1919
(
2020
r":doc:`(.+) <(.*)>`",
21-
r"`\1 <http://flask-restx.readthedocs.org/en/stable\2.html>`_",
21+
r"`\1 <https://flask-restx.readthedocs.io/en/stable\2.html>`_",
2222
),
2323
# replace issues references
2424
(

0 commit comments

Comments
 (0)