Hiya. Can you open a ticket?

(I’m guessing we may need to throw in a force_text()...)

Thanks!

On Wed, 24 Jul 2019 at 10:14, Chris Vigelius <[email protected]>
wrote:

> Hello,
>
> I'm trying to use the new generateschema command from 3.10. However it
> seems this does not handle lazy strings correctly.
>
> Using the UserSerializer right from the quickstart tutorial
> (ModelSerializer on django.contrib.auth.models.User) yields the following
> schema:
>
> openapi: 3.0.2
> info:
>   title: ''
>   version: TODO
> paths:
>   /users/:
>     get:
>       operationId: ListUsers
>       parameters: []
>       responses:
>         '200':
>           content:
>             application/json:
>               schema:
>                 required:
>                 - username
>                 properties:
>                   url:
>                     type: string
>                     readOnly: true
>                   username:
>                     type: string
>                     description: &id003
> !!python/object/apply:django.utils.functional._lazy_proxy_unpickle
>                     - &id001
> !!python/name:django.utils.translation.ugettext ''
>                     - !!python/tuple
>                       - Required. 150 characters or fewer. Letters, digits
> and @/./+/-/_
>                         only.
>                     - {}
>                     - &id002 !!python/name:builtins.str ''
>
> (note the garbage in username.description)
>
> Is this a bug or am I doing something wrong?
>
> thanks,
>  chris
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django REST framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-rest-framework/9a3aa24c-3174-43ee-94b8-0014e24c8e03%40googlegroups.com
> <https://groups.google.com/d/msgid/django-rest-framework/9a3aa24c-3174-43ee-94b8-0014e24c8e03%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-rest-framework/CAJwKpySRVAJBE8y6QmiRrGVAT4p7EP%3DZWHu04D9Uo5OLuT5BoQ%40mail.gmail.com.

Reply via email to