hi all,

I need help on how to make url that looks like this -- 
xxx/?parameter1=value&paramter2=value2 to accept user entry of testing 
values in swagger UI. Btw, I uses rest-framework-swagger to get the JSON 
documents auto-generated by swagger and the framework I used is django.

here is one url in urls.py that swagger knows how to provide a user entry:
url(r'^gs/(?P<PROJECT_ID>ID[0-9]+)$', gsViewSet.as_view({'get': 
'projOnly'})),
in swagger UI, when i hit "try it out", it shows parameter PROJECT_ID=< > 
in which I can enter value in the "< >" and test the API out.

here is the url in urls.py that swagger doesn't know how to provide a user 
entry:
url(r'^gs/$', gsViewSet.as_view({'get': 'getProjParam'})),
This urls expects ..../gs/?parameter1=value&paramter2=value2.... and when 
it sees those, it slurped those in and passed to gsViewSet.as_view({'get': 
'getProjParam'}).
But for swagger, since no predefined parameters are listed after "gs", it 
doesn't know what parameters should be listed to ask for user entries.

what do I do to make swagger doc render to know the parameters to list?

thanks,
chenhong

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to