Skip to content

Commit 7cbb675

Browse files
authored
remove internal use and reference in docs of deprecated output_schema (#121)
1 parent 4793f48 commit 7cbb675

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/customizing_token_claims.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MyTokenObtainPairOutSchema(Schema):
2626

2727

2828
class MyTokenObtainPairSchema(TokenObtainPairInputSchema):
29-
def output_schema(self):
29+
def to_response_schema(self):
3030
out_dict = self.get_response_schema_init_kwargs()
3131
out_dict.update(user=UserSchema.from_orm(self._user))
3232
return MyTokenObtainPairOutSchema(**out_dict)
@@ -38,7 +38,7 @@ class MyTokenObtainPairController(TokenObtainPairController):
3838
"/pair", response=MyTokenObtainPairOutSchema, url_name="token_obtain_pair"
3939
)
4040
def obtain_token(self, user_token: MyTokenObtainPairSchema):
41-
return user_token.output_schema()
41+
return user_token.to_response_schema()
4242

4343
```
4444

ninja_jwt/routers/obtain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
)
1919
def obtain_token(request, user_token: schema.obtain_pair_schema):
2020
user_token.check_user_authentication_rule()
21-
return user_token.output_schema()
21+
return user_token.to_response_schema()
2222

2323

2424
@obtain_pair_router.post(

0 commit comments

Comments
 (0)