diff options
author | Dan Timoney <dtimoney@att.com> | 2024-10-01 15:24:58 -0400 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2024-10-01 15:24:58 -0400 |
commit | 40aff8274b38f6eca82de9b0b6a3a35059c43c11 (patch) | |
tree | 37761f86b2bb56fe7ca9852973eda583d3c9212e /generic-resource-api/model/swagger/fixModuleUri.sh | |
parent | 19e65a8a9406208654c27557fd074eead872bfa8 (diff) |
Update major version and fix client
Update major version and adjust swagger to allow client to correctly parse
OpenDaylight version of RFC-8040, which is not completely standard.
Issue-ID: SDNC-1847
Signed-off-by: Dan Timoney <dtimoney@att.com>
Change-Id: I1e5fce6f3347b3525242b89dad565787ab777e35
Diffstat (limited to 'generic-resource-api/model/swagger/fixModuleUri.sh')
-rwxr-xr-x | generic-resource-api/model/swagger/fixModuleUri.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/generic-resource-api/model/swagger/fixModuleUri.sh b/generic-resource-api/model/swagger/fixModuleUri.sh index fae3872c..4c001867 100755 --- a/generic-resource-api/model/swagger/fixModuleUri.sh +++ b/generic-resource-api/model/swagger/fixModuleUri.sh @@ -1,5 +1,13 @@ #!/bin/sh +# fixModuleUri.sh : rewrites swagger to insert module name at beginning +# of URI (e.g. /rests/operations/GENERIC-RESOURCE-API:service-topology-operation) +# and to outer "output" tag, to be consistent with OpenDaylight ideosyncracies +# arguments: +# $1 - module name +# $2 - swagger file name +# +# Note: this was tested to work with yaml version of swagger mv $2 $2.backup -cat $2.backup | sed -e 's/'$1':/_&/1' -e 's/\([^_]\)'$1':/\//g' -e 's/_\('$1':\)/\1/' > $2 +cat $2.backup | sed -e 's/\/operations\//\/operations\/'$1':/g' -e 's/\/data\//\/data\/'$1':/g' -e 's/output:/\"'$1':output\":/g'> $2 rm $2.backup |