Skip to content

Commit d84b09e

Browse files
committed
Renamed missing json api occurences
1 parent af2a902 commit d84b09e

File tree

14 files changed

+33
-32
lines changed

14 files changed

+33
-32
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ This is the last release supporting Django 1.11, Django 2.1, Django REST Framewo
104104
### Added
105105

106106
* Added support for serializing nested serializers as attribute json value introducing setting `JSON_API_SERIALIZE_NESTED_SERIALIZERS_AS_ATTRIBUTE`
107-
* Note: As keys of nested serializers are not json:api spec field names they are not inflected by format field names option.
107+
* Note: As keys of nested serializers are not JSON:API spec field names they are not inflected by format field names option.
108108
* Added `rest_framework_json_api.serializer.Serializer` class to support initial JSON:API views without models.
109109
* Note that serializers derived from this class need to define `resource_name` in their `Meta` class.
110-
* This fix might be a **BREAKING CHANGE** if you use `rest_framework_json_api.serializers.Serializer` for non json:api spec views (usually `APIView`). You need to change those serializers classes to use `rest_framework.serializers.Serializer` instead.
110+
* This fix might be a **BREAKING CHANGE** if you use `rest_framework_json_api.serializers.Serializer` for non JSON:API spec views (usually `APIView`). You need to change those serializers classes to use `rest_framework.serializers.Serializer` instead.
111111

112112
### Fixed
113113

@@ -202,7 +202,7 @@ This is the last release supporting Python 2.7, Python 3.4, Django Filter 1.1, D
202202
* Don't swallow `filter[]` params when there are several
203203
* Fix DeprecationWarning regarding collections.abc import in Python 3.7
204204
* Allow OPTIONS request to be used on RelationshipView
205-
* Remove non-JSONAPI methods (PUT and TRACE) from ModelViewSet and RelationshipView.
205+
* Remove non-JSON:API methods (PUT and TRACE) from ModelViewSet and RelationshipView.
206206
This fix might be a **BREAKING CHANGE** if your clients are incorrectly using PUT instead of PATCH.
207207
* Avoid validation error for missing fields on a PATCH request using polymorphic serializers
208208

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ installed and activated:
149149

150150
Browse to
151151

152-
* http://localhost:8000 for the list of available collections (in a non-JSONAPI format!),
152+
* http://localhost:8000 for the list of available collections (in a non-JSON:API format!),
153153
* http://localhost:8000/swagger-ui/ for a Swagger user interface to the dynamic schema view, or
154154
* http://localhost:8000/openapi for the schema view's OpenAPI specification document.
155155

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ and add `rest_framework_json_api` to your `INSTALLED_APPS` setting below `rest_f
9797

9898

9999
Browse to
100-
* [http://localhost:8000](http://localhost:8000) for the list of available collections (in a non-JSONAPI format!),
100+
* [http://localhost:8000](http://localhost:8000) for the list of available collections (in a non-JSON:API format!),
101101
* [http://localhost:8000/swagger-ui/](http://localhost:8000/swagger-ui/) for a Swagger user interface to the dynamic schema view, or
102102
* [http://localhost:8000/openapi](http://localhost:8000/openapi) for the schema view's OpenAPI specification document.
103103

docs/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ multiple endpoints. Setting the `resource_name` on views may result in a differe
312312

313313
### Inflecting object and relation keys
314314

315-
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
315+
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
316316
a format of your choice. To hook this up include the following setting in your
317317
project settings:
318318

example/tests/test_filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def test_sort_underscore(self):
104104

105105
def test_sort_related(self):
106106
"""
107-
test sort via related field using jsonapi path `.` and django orm `__` notation.
107+
test sort via related field using JSON:API path `.` and django orm `__` notation.
108108
ORM relations must be predefined in the View's .ordering_fields attr
109109
"""
110110
for datum in ("blog__id", "blog.id"):

example/tests/test_generic_viewset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test_ember_expected_renderer(self):
5555

5656
def test_default_validation_exceptions(self):
5757
"""
58-
Default validation exceptions should conform to json:api spec
58+
Default validation exceptions should conform to JSON:API spec
5959
"""
6060
expected = {
6161
"errors": [

rest_framework_json_api/django_filters/backends.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class DjangoFilterBackend(DjangoFilterBackend):
1111
"""
1212
A Django-style ORM filter implementation, using `django-filter`.
1313
14-
This is not part of the jsonapi standard per-se, other than the requirement
14+
This is not part of the JSON:API standard per-se, other than the requirement
1515
to use the `filter` keyword: This is an optional implementation of style of
1616
filtering in which each filter is an ORM expression as implemented by
1717
DjangoFilterBackend and seems to be in alignment with an interpretation of
@@ -50,7 +50,7 @@ class DjangoFilterBackend(DjangoFilterBackend):
5050
the name of the query parameter for searching to make sure it doesn't conflict
5151
with a field name defined in the filterset.
5252
The recommended value is: `search_param="filter[search]"` but just make sure it's
53-
`filter[<something>]` to comply with the jsonapi spec requirement to use the filter
53+
`filter[<something>]` to comply with the JSON:API spec requirement to use the filter
5454
keyword. The default is "search" unless overriden but it's used here just to make sure
5555
we don't complain about it being an invalid filter.
5656
"""
@@ -117,7 +117,7 @@ def get_filterset_kwargs(self, request, queryset, view):
117117
raise ValidationError(
118118
"missing value for query parameter {}".format(qp)
119119
)
120-
# convert jsonapi relationship path to Django ORM's __ notation
120+
# convert JSON:API relationship path to Django ORM's __ notation
121121
key = m.groupdict()["assoc"].replace(".", "__")
122122
key = undo_format_field_name(key)
123123
data.setlist(key, val)

rest_framework_json_api/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def validate_query_params(self, request):
9090
9191
:raises ValidationError: if not.
9292
"""
93-
# TODO: For jsonapi error object conformance, must set jsonapi errors "parameter" for
93+
# TODO: For JSON:API error object conformance, must set JSON:API errors "parameter" for
9494
# the ValidationError. This requires extending DRF/DJA Exceptions.
9595
for qp in request.query_params.keys():
9696
m = self.query_regex.match(qp)

rest_framework_json_api/pagination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class JsonApiPageNumberPagination(PageNumberPagination):
1212
"""
13-
A json:api compatible pagination format.
13+
A JSON:API compatible pagination format.
1414
"""
1515

1616
page_query_param = "page[number]"

rest_framework_json_api/parsers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def parse(self, stream, media_type=None, parser_context=None):
8787
from rest_framework_json_api.views import RelationshipView
8888

8989
if isinstance(view, RelationshipView):
90-
# We skip parsing the object as JSONAPI Resource Identifier Object and not a regular
90+
# We skip parsing the object as JSON:API Resource Identifier Object and not a regular
9191
# Resource Object
9292
if isinstance(data, list):
9393
for resource_identifier_object in data:
@@ -96,12 +96,12 @@ def parse(self, stream, media_type=None, parser_context=None):
9696
and resource_identifier_object.get("type")
9797
):
9898
raise ParseError(
99-
"Received data contains one or more malformed JSONAPI "
99+
"Received data contains one or more malformed JSON:API "
100100
"Resource Identifier Object(s)"
101101
)
102102
elif not (data.get("id") and data.get("type")):
103103
raise ParseError(
104-
"Received data is not a valid JSONAPI Resource Identifier Object"
104+
"Received data is not a valid JSON:API Resource Identifier Object"
105105
)
106106

107107
return data
@@ -111,7 +111,7 @@ def parse(self, stream, media_type=None, parser_context=None):
111111
# Sanity check
112112
if not isinstance(data, dict):
113113
raise ParseError(
114-
"Received data is not a valid JSONAPI Resource Identifier Object"
114+
"Received data is not a valid JSON:API Resource Identifier Object"
115115
)
116116

117117
# Check for inconsistencies

0 commit comments

Comments
 (0)