Ask a Question

Change the default request name

SOLVED
_Oliver_
Contributor

Change the default request name

Hi all,

 

Not sure I am in the right section... 

Let's say I use the Swagger definition of Swagger Petsore here : https://petstore.swagger.io/v2/swagger.json

If I import these definitions in ReadyApi, I get something that will look like this :

_Oliver__0-1629458157303.png

I was wondering if there is any way to define specific names for the requests in Swagger to avoid having default request names, something that would result in this for example :

 

_Oliver__1-1629458363094.png

 

I know it is possible to rename these requests directly in ReadyApi but if I do that, next time I perform an API definition update from ReadyApi, the tool won't match the manually renamed request with the existing request, which means I will end up with something like this :

 

_Oliver__2-1629458529598.png

 

 

Please let me know if my question is not clear, english is not my mother tongue and I can be a bit unclear sometimes 🙂

 

Thanks

10 REPLIES 10
nmrao
Community Hero

Not sure if this is ok for you.
What if you don't keep those requests at all as they anyway not belongs to any test case nor executed.


Regards,
Rao.

Hi Rao,

 

Thanks for your reply. I am not sure what you mean, I showed the API part but that does not mean these requests are not used in any test case (they actually are).

Have I misunderstood something ?

 

Regards

Olivier

A little "up" with the hope that someone will be able to help 🙂

AAB
Regular Contributor

Hi @_Oliver_ 

If I understood you correctly, when you've imported the swagger in ReadyAPI and you create a testsuite, the popupwindow is asking you if you want the method to be inserted. Correct? If you say yes, then the methods that were preconfigured in the swagger, will show up here. Thus, if you want, each time when you update/refactor your api's, that you have the same names, you should update your swagger. 

That is, if I understood you correctly. 🙂

 

Kind regards,

AAB

Thanks for your reply @AAB  But which part of the swagger should be updated ?

AAB
Regular Contributor

@_Oliver_  well, I'm not a developper, but I've looked arround a bit and I came accross these:

https://docs.swagger.io/spec.html#523-operation-object

https://stackoverflow.com/questions/9569270/custom-method-names-in-asp-net-web-api

 

 

Have look in there, maybe this can help?

Kind regards,

AAB

 

Tnaks @AAB , I'll have a look

sonya_m
SmartBear Alumni (Retired)

Thanks for helping, Community!

 

@_Oliver_ were you able to solve your issue using the advice from the Community?


Sonya Mihaljova
Community and Education Specialist

Hello @sonya_m 

Yes, it's fine. Thanks again @AAB 

cancel
Showing results for 
Search instead for 
Did you mean: