summaryrefslogtreecommitdiff
path: root/hack
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-08 13:04:23 -0400
committerGitHub <noreply@github.com>2021-04-08 13:04:23 -0400
commit3a03c2ec71799727ea062faab0cc18050ec8c85e (patch)
treef022ce712f09a11f98c6da9d7ec6b98c12d3c68c /hack
parenta81b078a588fa5f9b5b42b2ffc894d00f06980c3 (diff)
parent4ceed6eb2f487899b19fade9cad01e5e8aaa7673 (diff)
downloadpodman-3a03c2ec71799727ea062faab0cc18050ec8c85e.tar.gz
podman-3a03c2ec71799727ea062faab0cc18050ec8c85e.tar.bz2
podman-3a03c2ec71799727ea062faab0cc18050ec8c85e.zip
Merge pull request #9121 from tmds/swagger_remove_name_wildcards
[NO TESTS NEEDED] swagger: remove name wildcards
Diffstat (limited to 'hack')
-rwxr-xr-xhack/swagger-check7
1 files changed, 4 insertions, 3 deletions
diff --git a/hack/swagger-check b/hack/swagger-check
index 646cbcb84..fc280c02d 100755
--- a/hack/swagger-check
+++ b/hack/swagger-check
@@ -178,9 +178,10 @@ sub handle_handle {
or die "$ME: $path:$.: Cannot grok '$line'\n";
my $endpoint = $1;
- # FIXME: in older code, '{name:..*}' meant 'nameOrID'. As of 2020-02
- # it looks like most of the '{name:..*}' entries are gone, except for one.
-###FIXME-obsolete? $endpoint =~ s|\{name:\.\.\*\}|{nameOrID}|;
+ # Some function declarations require an argument of the form '{name:.*}'
+ # but the swagger (which gets derived from the comments) should not
+ # include them. Normalize all such args to just '{name}'.
+ $endpoint =~ s/\{name:\.\*\}/\{name\}/;
# e.g. /auth, /containers/*/rename, /distribution, /monitor, /plugins
return 1 if $line =~ /\.UnsupportedHandler/;