[NETCONF-708] Swagger generates invalid RFC8040 paths for lists with multiple keys Created: 19/Jun/20 Updated: 16/Jun/21 Resolved: 15/Jun/21 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | restconf-openapi |
| Affects Version/s: | Aluminium |
| Fix Version/s: | 2.0.0, 1.13.3 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Aman . | Assignee: | Ivan Hrasko |
| Resolution: | Done | Votes: | 0 |
| Labels: | bgp, pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Priority: | Normal |
| Description |
|
Getting 500 server error for this rest api using RFC8040 url in swagger which is working perfectly fine with restconf(original) url. Both the urls are mentioned below.
In this url, protocol key has two values: According to RFC8040, the multiple keys should be separated with ',' instead of '='.
But It is not working even changing '=' with ',' . It seems there is a bug in calling the apis when we have a list of multiple keys(openconfig-policy-types:BGP and bgp-example in above case).
|
| Comments |
| Comment by Luis Gomez [ 29/Jun/20 ] |
|
I think this is issue is in RESTCONF so moving to that project. |
| Comment by Yevgeny Shakhnovich [ 12/Jun/21 ] |
|
The bug is in org.opendaylight.netconf.sal.rest.doc.impl.BaseYangSwaggerGenerator.java createPath method. The fix should be: + final ListPathBuilder keyBuilder = newListPathBuilder(); for (final QName listKey : listKeys) { - final ListPathBuilder keyBuilder = newListPathBuilder(); |
| Comment by Ivan Hrasko [ 16/Jun/21 ] |
|
Thanks yevgeny88 for your suggestions, its fixed now. |
| Comment by Luis Gomez [ 16/Jun/21 ] |
|
Thanks ivanhrasko for taking care of this |