Re: bearer auth/security section in OpenAPI Schema

2021-01-23 Thread Alan Crosswell
See https://github.com/encode/django-rest-framework/pull/7516 which is hopefully in the pipeline for the 3.13 release. This adds a framework for adding bearerAuth, etc. by adding two class methods to each Authentication class. I believe what you are calling bearerAuth I called tokenAuth. On Sat, J

Re: Component schema missing with update to 3.12

2020-10-12 Thread Alan Crosswell
Perhaps you mean to paste something in there, but if you extended in 3.11, you'll want to review carefully because a fair amount has changed in 3.12, especially the whole components/schemas and $ref's to them. On Mon, Oct 12, 2020 at 11:10 AM Stefano Tranquillini < stefano.tranquill...@gmail.com>

Re: DRF override settings during testing

2020-09-17 Thread Alan Crosswell
Also, take a look in tests/ for examples like this: @override_settings(REST_FRAMEWORK={'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.AutoSchema'}) On Thu, Sep 17, 2020 at 9:57 AM Alan Crosswell wrote: > It's plural: > > grep -nr DEFAULT_FILTER_

Re: DRF override settings during testing

2020-09-17 Thread Alan Crosswell
It's plural: grep -nr DEFAULT_FILTER_BACKEND rest_framework/settings.py rest_framework/settings.py:52:'DEFAULT_FILTER_BACKENDS': [], rest_framework/settings.py:141:'DEFAULT_FILTER_BACKENDS', On Thu, Sep 17, 2020 at 2:47 AM mohammad moghadas < s.m.moghadas2...@gmail.com> wrote: > Hi g

Re: AutoSchema and `components/security` section in resulting OpenAPI spec

2020-09-09 Thread Alan Crosswell
jects with required scopes. On Thu, Aug 20, 2020 at 2:10 PM Alan Crosswell wrote: > See > https://github.com/encode/django-rest-framework/pull/6670#issuecomment-677813417 > > On Wed, Aug 19, 2020 at 8:45 PM ad...@bit.io wrote: > >> Thanks all! >> >> This would be gre

Re: Serialize data sent by EmberJS

2020-09-04 Thread Alan Crosswell
lpatterns = [ >> url(r'', include(router.urls)), >> url(r'^estacionamentos/(?P[^/.]+)/$', >> EstacionamentoViewSet.as_view({'get': 'retrieve'}), >> name='estacionamento-detail'), >> url(r'

Re: Serialize data sent by EmberJS

2020-08-31 Thread Alan Crosswell
t;> appears the JSONAPIAdapter >> <https://api.emberjs.com/ember-data/3.20/classes/JSONAPIAdapter> is used >> by default. >> >> JSONAPI doesn't require you to send/receive the related resources unless >> you explicitly ask for them via the *inclu

Re: Serialize data sent by EmberJS

2020-08-26 Thread Alan Crosswell
N:API, I can set a > RESTSerializer at EmberJS. I > am still lost about posting data using DRF. Do I have to manipulate all > the data manually and set the fields as the serializer expects? I thought > the serializer would do the job. > > Em quarta-feira, 26 de agosto de 2020

Re: Serialize data sent by EmberJS

2020-08-26 Thread Alan Crosswell
Hi Camilla, I know almost nothing about EmberJS but I believe you may find that https://django-rest-framework-json-api.readthedocs.io/ may be helpful. It extends DRF to implement the JSONAPI.org spec, which I believe is originally based on Ember-data: "ember

Re: AutoSchema and `components/security` section in resulting OpenAPI spec

2020-08-20 Thread Alan Crosswell
not blocked on my work. > > Thanks! > > -Adam > > > On Tuesday, August 18, 2020 at 6:03:16 AM UTC-7 Alan Crosswell wrote: > >> PS: If getting this done for 3.12 would help, I'm game to take a shot at >> it. Please let me know. >> >> On Tue, A

Re: AutoSchema and `components/security` section in resulting OpenAPI spec

2020-08-18 Thread Alan Crosswell
PS: If getting this done for 3.12 would help, I'm game to take a shot at it. Please let me know. On Tue, Aug 18, 2020 at 9:01 AM Alan Crosswell wrote: > Yes, see https://github.com/n2ygk/drf-openapi-auth-schema. I had > originally implemented this as part of a PR > <https://

Re: AutoSchema and `components/security` section in resulting OpenAPI spec

2020-08-18 Thread Alan Crosswell
Yes, see https://github.com/n2ygk/drf-openapi-auth-schema. I had originally implemented this as part of a PR still in the works for DJA (DRF-jsonapi) but pulled it out of that PR as it was really DRF-specific. I've recentl

Re: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device

2020-01-23 Thread Alan Crosswell
googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-rest-framework/06350d15-982b-4cfc-ae36-e7b50c20b6f1%40googlegroups.com > <https://groups.google.com/d/msgid/django-rest-framework/06350d15-982b-4cfc-ae36-e7b50c20b6f1%40googlegroups.

Re: how to add allow methods

2019-09-10 Thread Alan Crosswell
ttps://groups.google.com/d/msgid/django-rest-framework/CAA9F9ijJTZgogDyg3ufKw%2Bm5sXuHpRFREfrdYyNKHmk%3D%3DnC_hg%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Jakob Damgaard Olsen > Tlf: 24613112 > > -- > You received this message be

Re: Separating authentication server and resource server.

2019-07-05 Thread Alan Crosswell
_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Alan Crosswell Associate VP & CTO -- You received this message because you are subscribed to the Google Groups "Django REST framework" group. To unsubscribe f

Re: Accessing queryset in serializer

2019-06-28 Thread Alan Crosswell
om/d/msgid/django-rest-framework/82538816-1454-479c-b944-6dbd82686295%40googlegroups.com > <https://groups.google.com/d/msgid/django-rest-framework/82538816-1454-479c-b944-6dbd82686295%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://group

Re: request.user in DRF Views vs Django Views

2019-06-04 Thread Alan Crosswell
subscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-rest-framework/32b95cf9-3e7f-4b70-a60c-41efdf65f0f5%40googlegroups.com > <https://groups.google.com/d/msgid/django-rest-framework/32b95cf9-3e7f-4b70-a60c-41efdf65f0f5%40goo

Re: How to intermediate all API request calls

2019-05-15 Thread Alan Crosswell
sgid/django-rest-framework/CAOe%2B_5kWjrLu%3D_8cqkAn%2BAmGf2_kv-aHSNsiHDv2z9F%3DezZ8Fg%40mail.gmail.com > <https://groups.google.com/d/msgid/django-rest-framework/CAOe%2B_5kWjrLu%3D_8cqkAn%2BAmGf2_kv-aHSNsiHDv2z9F%3DezZ8Fg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . >

Re: Serving an OpenAPI / Swagger schema via embedded SwaggerUI

2019-04-02 Thread Alan Crosswell
Yes Matt sent and dev.to fixed their April Fools SNAFU. On Mon, Apr 1, 2019 at 11:45 PM Gonzalo Amadio wrote: > I tried and it's working for me. > Let me know, if not I copy it for you > > El mar., 2 abr. 2019 3:06, Alan Crosswell escribió: > >> Sorry for the interrup

Re: Serving an OpenAPI / Swagger schema via embedded SwaggerUI

2019-04-01 Thread Alan Crosswell
gt; -- > 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 django-rest-framework+unsubscr...@googlegroups.com. > For more options, vis

Re: Returning Json errors with custom (non-json) renderers

2019-02-11 Thread Alan Crosswell
; >> exporter = serializer.save() >> filename = '{}.{}'.format( >> exporter.resource_name, >> request.accepted_renderer.format >> ) >> >> return Response( >> exporter.export_d

Re: call remote method (action) over DRF

2019-02-05 Thread Alan Crosswell
REST design. See the Django-restframework-jsonapi package. On Tue, Feb 5, 2019 at 7:54 AM Alan Crosswell wrote: > SOAP-style remote method invocation is not RESTful. In REST, resources are > nouns and the only verbs are the HTTP methods — GET, POST, PUT, PATCH, > DELETE, etc. you’ll want t

Re: call remote method (action) over DRF

2019-02-05 Thread Alan Crosswell
how to design calling > methods in DRF? > > Thank you in advance for help. > Hanz > > -- > 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

Re: REST Calls to Filter Based On Greater Than, Less Than, or Range

2019-01-04 Thread Alan Crosswell
ri, Jan 4, 2019 at 8:15 AM Alan Crosswell wrote: > Double is what Django uses to indicate a relationship rather than just an > underscore that is part of a field_name. You can make a custom field name > that is what the client uses as in my example but the actual ORM reference > has to

Re: REST Calls to Filter Based On Greater Than, Less Than, or Range

2019-01-04 Thread Alan Crosswell
Django REST URL is more user friendly. Thanks. > > > On Thu, Jan 3, 2019 at 6:43 PM Alan Crosswell wrote: > >> Take a look at >> https://github.com/columbia-it/django-jsonapi-training/blob/master/myapp/views.py#L142-L161 >> >> On Thu, Jan 3, 2019 at 5:57 PM Foobar

Re: REST Calls to Filter Based On Greater Than, Less Than, or Range

2019-01-03 Thread Alan Crosswell
> To unsubscribe from this group and stop receiving emails from it, send an > email to django-rest-framework+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Alan Crosswell Associate VP & CTO -- You received this message bec

Re: Custom Mixin for Mulitple Field Object Lookup in Django REST

2018-10-30 Thread Alan Crosswell
o be searched? > > If this is the case, how does it know whether I want to search on pk or > unit_name? I feel I'm missing something. > > On Tue, Oct 30, 2018 at 2:15 PM Alan Crosswell wrote: > >> Asad: >> >> I believe what you want should work with Searc

Re: Custom Mixin for Mulitple Field Object Lookup in Django REST

2018-10-30 Thread Alan Crosswell
e being defined using routers? > > On Tue, Oct 30, 2018 at 8:23 AM Alan Crosswell wrote: > >> This seems like you are reinventing SearchFilter. Maybe I’m >> misunderstanding. >> https://www.django-rest-framework.org/api-guide/filtering/ >> >> On Mon, Oct 29, 2

Re: Custom Mixin for Mulitple Field Object Lookup in Django REST

2018-10-30 Thread Alan Crosswell
ined in router.py?) > > > url(r'^units/(?P[^/.]+)$', views.UnitViewSet, name='unit-detail') > > > Any help would be appreciated. Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "Django REST framework"

DRF OAS 3.0 client (apistar) as a Model?

2018-10-02 Thread Alan Crosswell
Is there a thought to having the OAS/apistar client "look like" a Django Model in a manner similar to https://github.com/Yupeek/django-rest-models? I really want to be able to layer stacks of DRF/DJA microservices on top of each other with perhaps a bottom tier that is database-model based. It