You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
call an API when its nickname collid with other resources
...
which implies that a non-unique nickname is OK.
However, on parsing, if nicknames are not used within the API, the parse fails if they are non-unique:
api_applications = App.create('./api_name.json')
...
~/.pyenv/versions/3.6.5/envs/3.6/lib/python3.6/site-packages/pyswagger/spec/v1_2/objects.py in init(self, ctx)
269 name = op.nickname
270 if name in new_api.keys():
--> 271 raise ValueError('duplication operation found: ' + name)
272
273 # Operation objects now have 'path' attribute.
ValueError: duplication operation found: get
Admittedly, not what I would have chosen for a nickname, but I'm dealing with a foreign API I have no control over.
The text was updated successfully, but these errors were encountered:
@bedge Yep, it's a behavior to tolerate the different between Swagger 1.2 to 2.0. But this exception should only raise when duplicated nickname found in the same resource, and it's unexpected. For example:
# OK
pet.updatePet
user.updatePet
# NOK
pet.updatePet
pet.updatePet
Could you check if this is your case, if not, could you help to provide a reproducible example?
The app docs: https://github.com/mission-liao/pyswagger/blob/develop/docs/md/ref/app.md state:
which implies that a non-unique nickname is OK.
However, on parsing, if nicknames are not used within the API, the parse fails if they are non-unique:
Admittedly, not what I would have chosen for a nickname, but I'm dealing with a foreign API I have no control over.
The text was updated successfully, but these errors were encountered: