Skip to content

Changed all external links to https #989

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Safa AlFulaij <[email protected]>
santiavenda <[email protected]>
Sergey Kolomenkin <https://kolomenkin.com>
Stas S. <[email protected]>
Swaraj Baral <[email protected]>
Tim Selman <[email protected]>
Tom Glowka <[email protected]>
Ulrich Schuster <[email protected]>
Expand Down
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Note that in line with [Django REST framework policy](http://www.django-rest-framework.org/topics/release-notes/),
Note that in line with [Django REST framework policy](https://www.django-rest-framework.org/topics/release-notes/),
any parts of the framework not mentioned in the documentation should generally be considered private API, and may be subject to change.

## [Unreleased]
Expand Down Expand Up @@ -240,7 +240,7 @@ This is the last release supporting Python 2.7, Python 3.4, Django Filter 1.1, D
* Add testing configuration to `REST_FRAMEWORK` configuration as described in [DRF](https://www.django-rest-framework.org/api-guide/testing/#configuration)
* Add `HyperlinkedRelatedField` and `SerializerMethodHyperlinkedRelatedField`. See [usage docs](docs/usage.md#related-fields)
* Add related urls support. See [usage docs](docs/usage.md#related-urls)
* Add optional [jsonapi-style](http://jsonapi.org/format/) filter backends. See [usage docs](docs/usage.md#filter-backends)
* Add optional [jsonapi-style](https://jsonapi.org/format/) filter backends. See [usage docs](docs/usage.md#filter-backends)

### Deprecated

Expand Down Expand Up @@ -268,7 +268,7 @@ This is the last release supporting Python 2.7, Python 3.4, Django Filter 1.1, D
* Add `ReadOnlyModelViewSet` extension with prefetch mixins
* Add support for Django REST framework 3.8.x
* Introduce `JSON_API_FORMAT_FIELD_NAMES` option replacing `JSON_API_FORMAT_KEYS` but in comparison preserving
values from being formatted as attributes can contain any [json value](http://jsonapi.org/format/#document-resource-object-attributes).
values from being formatted as attributes can contain any [json value](https://jsonapi.org/format/#document-resource-object-attributes).
* Allow overwriting of `get_queryset()` in custom `ResourceRelatedField`

### Deprecated
Expand Down
16 changes: 8 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Overview
**JSON:API support for Django REST framework**

* Documentation: https://django-rest-framework-json-api.readthedocs.org/
* Format specification: http://jsonapi.org/format/
* Format specification: https://jsonapi.org/format/


By default, Django REST framework will produce a response like::

{
"count": 20,
"next": "http://example.com/api/1.0/identities/?page=3",
"previous": "http://example.com/api/1.0/identities/?page=1",
"next": "https://example.com/api/1.0/identities/?page=3",
"previous": "https://example.com/api/1.0/identities/?page=1",
"results": [{
"id": 3,
"username": "john",
Expand All @@ -43,9 +43,9 @@ like the following::

{
"links": {
"prev": "http://example.com/api/1.0/identities",
"self": "http://example.com/api/1.0/identities?page=2",
"next": "http://example.com/api/1.0/identities?page=3",
"prev": "https://example.com/api/1.0/identities",
"self": "https://example.com/api/1.0/identities?page=2",
"next": "https://example.com/api/1.0/identities?page=3",
},
"data": [{
"type": "identities",
Expand Down Expand Up @@ -81,7 +81,7 @@ As a Django REST framework JSON:API (short DJA) we are trying to address followi

5. Be performant

.. _JSON:API: http://jsonapi.org
.. _JSON:API: https://jsonapi.org
.. _Django REST framework: https://www.django-rest-framework.org/

------------
Expand Down Expand Up @@ -202,4 +202,4 @@ override ``settings.REST_FRAMEWORK``

This package provides much more including automatic inflection of JSON keys, extra top level data (using nested
serializers), relationships, links, paginators, filters, and handy shortcuts.
Read more at http://django-rest-framework-json-api.readthedocs.org/
Read more at https://django-rest-framework-json-api.readthedocs.org/
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BUILDDIR = _build

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(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/)
$(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/)
endif

# Internal variables.
Expand Down
12 changes: 6 additions & 6 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ By default, Django REST framework produces a response like:
``` js
{
"count": 20,
"next": "http://example.com/api/1.0/identities/?page=3",
"previous": "http://example.com/api/1.0/identities/?page=1",
"next": "https://example.com/api/1.0/identities/?page=3",
"previous": "https://example.com/api/1.0/identities/?page=1",
"results": [{
"id": 3,
"username": "john",
Expand All @@ -25,10 +25,10 @@ like the following:
``` js
{
"links": {
"first": "http://example.com/api/1.0/identities",
"last": "http://example.com/api/1.0/identities?page=5",
"next": "http://example.com/api/1.0/identities?page=3",
"prev": "http://example.com/api/1.0/identities",
"first": "https://example.com/api/1.0/identities",
"last": "https://example.com/api/1.0/identities?page=5",
"next": "https://example.com/api/1.0/identities?page=3",
"prev": "https://example.com/api/1.0/identities",
},
"data": [{
"type": "identities",
Expand Down
2 changes: 1 addition & 1 deletion docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if errorlevel 9009 (
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
echo.https://sphinx-doc.org/
exit /b 1
)

Expand Down
24 changes: 12 additions & 12 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The DJA package implements a custom renderer, parser, exception handler, query filter backends, and
pagination. To get started enable the pieces in `settings.py` that you want to use.

Many features of the [JSON:API](http://jsonapi.org/format) format standard have been implemented using
Many features of the [JSON:API](https://jsonapi.org/format) format standard have been implemented using
Mixin classes in `serializers.py`.
The easiest way to make use of those features is to import ModelSerializer variants
from `rest_framework_json_api` instead of the usual `rest_framework`
Expand Down Expand Up @@ -116,7 +116,7 @@ is used. This can help the client identify misspelled query parameters, for exam

If you want to change the list of valid query parameters, override the `.query_regex` attribute:
```python
# compiled regex that matches the allowed http://jsonapi.org/format/#query-parameters
# compiled regex that matches the allowed https://jsonapi.org/format/#query-parameters
# `sort` and `include` stand alone; `filter`, `fields`, and `page` have []'s
query_regex = re.compile(r'^(sort|include)$|^(filter|fields|page)(\[[\w\.\-]+\])?$')
```
Expand All @@ -134,7 +134,7 @@ simply don't use this filter backend.

#### OrderingFilter

`OrderingFilter` implements the [JSON:API `sort`](http://jsonapi.org/format/#fetching-sorting) and uses
`OrderingFilter` implements the [JSON:API `sort`](https://jsonapi.org/format/#fetching-sorting) and uses
DRF's [ordering filter](https://www.django-rest-framework.org/api-guide/filtering/#orderingfilter).

Per the JSON:API specification, "If the server does not support sorting as specified in the query parameter `sort`,
Expand All @@ -159,14 +159,14 @@ If you want to silently ignore bad sort fields, just use `rest_framework.filters

#### DjangoFilterBackend

`DjangoFilterBackend` implements a Django ORM-style [JSON:API `filter`](http://jsonapi.org/format/#fetching-filtering)
`DjangoFilterBackend` implements a Django ORM-style [JSON:API `filter`](https://jsonapi.org/format/#fetching-filtering)
using the [django-filter](https://django-filter.readthedocs.io/) package.

This filter is not part of the JSON:API standard per-se, other than the requirement
to use the `filter` keyword: It is an optional implementation of a style of
filtering in which each filter is an ORM expression as implemented by
`DjangoFilterBackend` and seems to be in alignment with an interpretation of the
[JSON:API _recommendations_](http://jsonapi.org/recommendations/#filtering), including relationship
[JSON:API _recommendations_](https://jsonapi.org/recommendations/#filtering), including relationship
chaining.

Filters can be:
Expand Down Expand Up @@ -240,7 +240,7 @@ class MyViewset(ModelViewSet):
### Exception handling

For the `exception_handler` class, if the optional `JSON_API_UNIFORM_EXCEPTIONS` is set to True,
all exceptions will respond with the JSON:API [error format](http://jsonapi.org/format/#error-objects).
all exceptions will respond with the JSON:API [error format](https://jsonapi.org/format/#error-objects).

When `JSON_API_UNIFORM_EXCEPTIONS` is False (the default), non-JSON:API views will respond
with the normal DRF error format.
Expand Down Expand Up @@ -312,7 +312,7 @@ multiple endpoints. Setting the `resource_name` on views may result in a differe

### Inflecting object and relation keys

This package includes the ability (off by default) to automatically convert [JSON:API field names](http://jsonapi.org/format/#document-resource-object-fields) of requests and responses from the python/rest_framework's preferred underscore to
This package includes the ability (off by default) to automatically convert [JSON:API field names](https://jsonapi.org/format/#document-resource-object-fields) of requests and responses from the python/rest_framework's preferred underscore to
a format of your choice. To hook this up include the following setting in your
project settings:

Expand Down Expand Up @@ -551,7 +551,7 @@ class OrderSerializer(serializers.ModelSerializer):

```

In the [JSON:API spec](http://jsonapi.org/format/#document-resource-objects),
In the [JSON:API spec](https://jsonapi.org/format/#document-resource-objects),
relationship objects contain links to related objects. To make this work
on a serializer we need to tell the `ResourceRelatedField` about the
corresponding view. Use the `HyperlinkedModelSerializer` and instantiate
Expand Down Expand Up @@ -755,12 +755,12 @@ class OrderSerializer(serializers.HyperlinkedModelSerializer):
### RelationshipView
`rest_framework_json_api.views.RelationshipView` is used to build
relationship views (see the
[JSON:API spec](http://jsonapi.org/format/#fetching-relationships)).
[JSON:API spec](https://jsonapi.org/format/#fetching-relationships)).
The `self` link on a relationship object should point to the corresponding
relationship view.

The relationship view is fairly simple because it only serializes
[Resource Identifier Objects](http://jsonapi.org/format/#document-resource-identifier-objects)
[Resource Identifier Objects](https://jsonapi.org/format/#document-resource-identifier-objects)
rather than full resource objects. In most cases the following is sufficient:

```python
Expand Down Expand Up @@ -896,7 +896,7 @@ Related links will be created automatically when using the Relationship View.

JSON:API can include additional resources in a single network request.
The specification refers to this feature as
[Compound Documents](http://jsonapi.org/format/#document-compound-documents).
[Compound Documents](https://jsonapi.org/format/#document-compound-documents).
Compound Documents can reduce the number of network requests
which can lead to a better performing web application.
To accomplish this,
Expand Down Expand Up @@ -1058,7 +1058,7 @@ class MySchemaGenerator(JSONAPISchemaGenerator):
}
}
schema['servers'] = [
{'url': 'https://localhost/v1', 'description': 'local docker'},
{'url': 'http://localhost/v1', 'description': 'local docker'},
{'url': 'http://localhost:8000/v1', 'description': 'local dev'},
{'url': 'https://api.example.com/v1', 'description': 'demo server'},
{'url': '{serverURL}', 'description': 'provide your server URL',
Expand Down
6 changes: 3 additions & 3 deletions rest_framework_json_api/django_filters/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DjangoFilterBackend(DjangoFilterBackend):
to use the `filter` keyword: This is an optional implementation of style of
filtering in which each filter is an ORM expression as implemented by
DjangoFilterBackend and seems to be in alignment with an interpretation of
http://jsonapi.org/recommendations/#filtering, including relationship
https://jsonapi.org/recommendations/#filtering, including relationship
chaining. It also returns a 400 error for invalid filters.

Filters can be:
Expand Down Expand Up @@ -58,8 +58,8 @@ class DjangoFilterBackend(DjangoFilterBackend):
search_param = api_settings.SEARCH_PARAM

# Make this regex check for 'filter' as well as 'filter[...]'
# See http://jsonapi.org/format/#document-member-names for allowed characters
# and http://jsonapi.org/format/#document-member-names-reserved-characters for reserved
# See https://jsonapi.org/format/#document-member-names for allowed characters
# and https://jsonapi.org/format/#document-member-names-reserved-characters for reserved
# characters (for use in paths, lists or as delimiters).
# regex `\w` matches [a-zA-Z0-9_].
# TODO: U+0080 and above allowed but not recommended. Leave them out for now.e
Expand Down
6 changes: 3 additions & 3 deletions rest_framework_json_api/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class OrderingFilter(OrderingFilter):
"""
A backend filter that implements http://jsonapi.org/format/#fetching-sorting and
A backend filter that implements https://jsonapi.org/format/#fetching-sorting and
raises a 400 error if any sort field is invalid.

If you prefer *not* to report 400 errors for invalid sort fields, just use
Expand Down Expand Up @@ -74,10 +74,10 @@ class QueryParameterValidationFilter(BaseFilterBackend):

If you want to add some additional non-standard query parameters,
override :py:attr:`query_regex` adding the new parameters. Make sure to comply with
the rules at http://jsonapi.org/format/#query-parameters.
the rules at https://jsonapi.org/format/#query-parameters.
"""

#: compiled regex that matches the allowed http://jsonapi.org/format/#query-parameters:
#: compiled regex that matches the allowed https://jsonapi.org/format/#query-parameters:
#: `sort` and `include` stand alone; `filter`, `fields`, and `page` have []'s
query_regex = re.compile(
r"^(sort|include)$|^(?P<type>filter|fields|page)(\[[\w\.\-]+\])?$"
Expand Down