Forum Discussion

bfourie's avatar
bfourie
Occasional Contributor
11 years ago

Multiple methods with different parameters

Hey!

 

I'm trying to add a second method to a resource with different parameters. It is not allowing me to do this. Not sure if this is a bug. I know I have done it before.

So to explain visually.

In resources I've added them like this:

1.png

So we have a RESTful get, and a post with a json payload.

 

GetAchievements has 3 parameters as you will see next.

CreateAchievement should have a single parameter, but inherits from the previous one. If I delete them from Create, it deletes from Get as well.

See below:

2.png

 

CreateAchievement

3.png

 

Now I know I have done this before. The reseources for users:

 

4.PNG

 

CreateUser. Notice single parameter:

5.PNG

 

GetUsers

6.PNG

 

I have no idea how I created these. I think that was still in soapui free version before we switched over to readyAPI.

However, I've tried to do it in the free version, and they still seems to be linked. Add a parameter, it adds it on both methods. Why does user work then?

 

 

1 Reply

  • forkbattery's avatar
    forkbattery
    Occasional Contributor

    Hi, this is because you're creating Resource Level parameters. If you create method level parameters, they won't be shared between separate methods.

     

    So you know how for each parameter you have Name, Value, Style and Level. Change the Level from 'RESOURCE' to 'METHOD'.