[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wsas-java-dev
Subject:    Re: [Dev] Questions using WSO2 API Manager 2.6.0
From:       Thilini Shanika <thilinis () wso2 ! com>
Date:       2019-07-10 21:10:55
Message-ID: CAB-Stwze0QsQ4HoUBBUBW8=jp19MS_FXfeRVg8P7PabX0CVe4A () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/related)]

[Attachment #4 (multipart/alternative)]


On Wed, Jul 10, 2019 at 9:44 AM Harsha Kumara <harshak@wso2.com> wrote:

>
>
> On Wed, Jul 10, 2019 at 8:06 PM Bernard Paris <bernard.paris@uclouvain.be>
> wrote:
>
>> Hello,
>>
>> using WSO2 API Manager 2.6.0
>>
>> we have this kind of API interface, I have a problem and a question:
>>
>> > the problem : the selected value for "type" parameter is not applied in
>> the URL
>> > the question : how do we do in the publisher to obtain this kind of
>> "select" field type ? (for the example below I imported the API swagger
>> from an existing one so I didn't define it myself)
>>
>
To have this type parameter dropdown, you need to define enums with
possible values under the query param definition. Please follow below steps
to add enum values for a query param.

   - Add a query parameter under a given resource
   - Go to swagger editor by clicking 'Edit source' button(Step 3 in [1])
   - Add following under the query param definition.


enum:
   - OFFRE
   - MINEURE

eg:

[image: Screen Shot 2019-07-10 at 4.08.22 PM.png]


   - Apply changes


[1]
https://docs.wso2.com/display/AM260/Edit+and+Consume+APIs+using+Swagger+Tools

https://swagger.io/docs/specification/data-models/enums/




> On another field I have tried to define "enum" Data type instead of string
>> or nothing, but this doesn't what I'm expecting.
>>
>
Can we get the swagger definition you are trying with, then we can further
check this?

>
>>
>>
>>
>>
>> Thanks for this,
>> Bernard
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
> --
>
> *Harsha Kumara*
>
> Technical Lead, WSO2 Inc.
> Mobile: +94775505618
> Email: harshak@wso2.coim
> Blog: harshcreationz.blogspot.com
>
> GET INTEGRATION AGILE
> Integration Agility for Digitally Driven Business
>


-- 
Thilini Shanika
Associate Technical Lead
WSO2, Inc.; http://wso2.com
20, Palmgrove Avenue, Colombo 3

[Attachment #7 (text/html)]

<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Wed, Jul 10, 2019 at 9:44 AM Harsha Kumara &lt;<a \
href="mailto:harshak@wso2.com">harshak@wso2.com</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 10, 2019 at 8:06 PM \
Bernard Paris &lt;<a href="mailto:bernard.paris@uclouvain.be" \
target="_blank">bernard.paris@uclouvain.be</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div><div \
dir="auto"><div>Hello,</div><div><br></div><div>using  <span \
style="color:rgb(203,203,203);font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;background-color:rgb(34,34,34)">WSO2 \
API Manager 2.6.0  </span></div><div><br></div><div>we have this kind of API \
interface, I have a problem and a question:</div><div><br></div><div>&gt; the problem \
: the selected value for &quot;type&quot; parameter is not applied in the \
URL</div><div>&gt; the question : how do we do in the publisher to obtain this kind \
of &quot;select&quot; field type ? (for the example below I imported the API swagger \
from an existing one so I didn&#39;t define it \
myself)</div></div></div></blockquote></div></blockquote><div><br></div><div>To have \
this type parameter dropdown, you need to define enums with possible values under the \
query param definition. Please follow below steps to add enum values for a query \
param.</div><div><ul><li>Add a query parameter under a given resource</li><li>Go to \
swagger editor by clicking &#39;Edit source&#39; button(Step 3 in [1])</li><li>Add \
following under the query param definition.</li></ul></div></div><blockquote \
style="margin:0 0 0 40px;border:none;padding:0px"><div \
class="gmail_quote"><div></div></div><br><div><div class="enum: hljs cpp" \
style="display:block;overflow-x:auto;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,248);font-family:monospace"><div \
class="gmail_quote"><div><span class="hljs-keyword" \
style="font-weight:bold">enum</span>:</div></div><div class="gmail_quote"><div>     - \
OFFRE</div></div><div class="gmail_quote"><div>     - \
MINEURE</div></div></div></div></blockquote><blockquote style="margin:0 0 0 \
40px;border:none;padding:0px">eg:  </blockquote><div><img src="cid:ii_jxxqkxx81" \
alt="Screen Shot 2019-07-10 at 4.08.22 PM.png" width="338" height="272" \
style="margin-right: 0px;"><br></div><blockquote style="margin:0 0 0 \
40px;border:none;padding:0px"><div \
class="gmail_quote"><div></div></div></blockquote><div \
class="gmail_quote"><div><ul><li>Apply changes</li></ul></div><div><br></div><div>[1] \
<a href="https://docs.wso2.com/display/AM260/Edit+and+Consume+APIs+using+Swagger+Tools \
">https://docs.wso2.com/display/AM260/Edit+and+Consume+APIs+using+Swagger+Tools</a>  \
</div><div><a href="https://swagger.io/docs/specification/data-models/enums/">https:// \
swagger.io/docs/specification/data-models/enums/</a></div><div><br></div><div><br></div><div> \
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px \
solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div><div dir="auto"><div>On another field I have \
tried to define &quot;enum&quot; Data type instead of string or nothing, but this \
doesn&#39;t what I&#39;m \
expecting.</div></div></div></blockquote></div></blockquote><div><br></div><div>Can \
we get the swagger definition you are trying with, then we can further check this?  \
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px \
solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div><div \
dir="auto"><div><br></div><div><br></div><div><br></div><div><img \
id="gmail-m_-2097840632737191311gmail-m_-49518593204429772672C450874-5D5D-4C89-BAC3-FB493E7B3012" \
src="cid:16bdc574b05117769e31"></div><div><br></div><div><br></div><div>Thanks for \
this,</div><div>Bernard</div></div></div>_______________________________________________<br>
 Dev mailing list<br>
<a href="mailto:Dev@wso2.org" target="_blank">Dev@wso2.org</a><br>
<a href="http://wso2.org/cgi-bin/mailman/listinfo/dev" rel="noreferrer" \
target="_blank">http://wso2.org/cgi-bin/mailman/listinfo/dev</a><br> \
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" \
class="gmail-m_-2097840632737191311gmail_signature"><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><b>Harsha \
Kumara<br></b></div><div><b><br></b></div>Technical Lead, WSO2 Inc.<br></div>Mobile: \
+94775505618<br></div><div>Email: <a href="mailto:harshak@wso2.coim" \
target="_blank">harshak@wso2.coim</a></div>Blog:  <a \
href="http://harshcreationz.blogspot.com" \
target="_blank">harshcreationz.blogspot.com</a><br></div></div><div \
dir="ltr"><br></div><div dir="ltr"><div>GET INTEGRATION AGILE</div><div>Integration \
Agility for Digitally Driven Business</div></div></div></div></div></div></div></div> \
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" \
class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr"><span><font color="#888888"><span \
style="color:rgb(153,153,153)">Thilini Shanika<br><span \
style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Associate \
Technical Lead</span></span><br>

<span style="color:rgb(153,153,153)">WSO2, Inc</span>.; <a href="http://wso2.com" \
target="_blank">http://wso2.<span>com</span></a><br></font></span><span \
dir="ltr"><span style="color:rgb(153,153,153)">20, Palmgrove Avenue, Colombo \
3</span><br></span><div><span \
dir="ltr"><br></span></div><br></div></div></div></div></div></div></div></div></div>

--000000000000932643058d5a1dc3--


["PastedGraphic-6.tiff" (image/tiff)]
["Screen Shot 2019-07-10 at 4.08.22 PM.png" (image/png)]

_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic