django-rest-swagger==2.1.1 query parameter - django

i have an api(web service) in django like this:
http://127.0.0.1:9000/api/back_office/appointments/days/?branch=1
that in swagger i want to input query parameter named branch but don't work this(all of my Apis have same problem!!).
before, i use older version of swagger and for enter query parameters use like --param_name syntax, but now in django-rest-swagger==2.1.1 don't work this syntax.
can anyone help me?
Perhaps i should use get_customizations in OpenAPIRenderer class?
Thanks in advance.

For adding query parameters to swagger please, go through this post

Related

Annotating arrays to have minItems with Swashbuckle / Swagger

Is there a way to annotate my C# code to specify an array is a required parameter and should have at least one item?
It currently shows as optional in Swagger.
I am using Swashbuckle.AspNetCore 1.2.0
Thanks!
Wrapping the parameters in a DTO allows each field to be annotated. In the case of an IEnumerable<> field, it can be annotated with [MinLength(1)], which then carries over to the Swagger.
While this was supported on Swashbuckle:
https://github.com/domaindrivendev/Swashbuckle/search?q=minItems
It does not seem to be the case on Swashbuckle.AspNetCore
https://github.com/domaindrivendev/Swashbuckle.AspNetCore/search?q=minItems
Your only option is to request it as a new feature, and hopefully they will add it soon:
https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/new

Modify List View Query of Helpdesk module

I am using vTiger 6.4 and trying to modify list view query of help desk module.
I have tried by modifying the function getListQuery() from \include\utils\ListViewUtils.php but no effect if i changed anything from it. If anyone knows the file path to modify the where condition then please help me.
Thanks in advance!
modules\Vtiger\models\ListView.php
change below function $listQuery query
getListViewEntries

How to make spree, rails and liqpay to work together?

I have a Rails application with Spree. I need to use Liqpay for payment and i have some troubles with it's API. I have inserted Liqpay button it is looks like
<a href="https://www.liqpay.com/api/pay?public_key=<public_key>&private_key=<private_key>&signature=<%=#sign%>&amount=<%=#order.total%>&order_id=<%= #order.id%>currency=RUB&description=Desc&type=buy&sandbox=1&pay_way=card,delayed&server_url=<my_site_api_url>&language=ru&return_url=<return_url>">
signature #sign is calculated using gem Lickpay https://github.com/leonid-shevtsov/liqpay
request = Liqpay::Request.new (<some_params>)
#sign = request.signature
this is not exectly the way, described in Liqpay docs, but that does not work too((
There is a way to make requsts to Spree without signature, but a can't cend order_id in this case, but I need it. Is there a way to calculate it correctly, or to deal without it? How I will get to know order_id in this case? Thank you!
Fiinally, made it. It is pretty easy and clear, what I had to is read documentation on Liqpay carefully. So, the first is on need to install this lib - https://github.com/liqpay/sdk-ruby
and then follow liqpay guides! One thing one need to note - is that signature should be calculated with exactly the same params, request to Liqpay Api is made.

redirecting apache to a different module

i currently have an apache module which when invoked performs a number of operations one of which is to modify a URL in the form of a string. I would subsequently like to redirect to this URL. Unfortunately there is not much documentation available to help me accomplish this, can someone who has done similar please advise?
thanks in advance
You can use the apr_table_add function with headers_out, that holds the response headers.
apr_table_add(r->headers_out, "Location", your_url);
return HTTP_MOVED_PERMANENTLY;

issues with url in multiple languages

I am using the concept of multiple languages in my project, and everything works fine.
But i am having some queries about my url.
When i am using this url www.asd.com/reg/?lang=es, then it display the data in spanish form.
But if i am using this url www.asd.com/reg/lang=es, then it does not display data in spanish.
The difference between two url is "?" , so can anybody suggest me some way with which I can accomplish my task without this "?"
Thanks
It's not possible to post variables without the ? in your URL. (more informations here)
If you want to manage it without the GET-Parameter (?lang) you need to rewrite the middleware I've posted to you. Also you need to modify your urls.py.
All you then may achieve is www.asd.com/reg/lang/es or http://es.asd.com/reg if you're familiar with subdomaining.