mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Remove Authentication from swagger API
This commit is contained in:
parent
9da6dd1f7e
commit
0b6f2e9165
5 changed files with 131 additions and 14 deletions
|
@ -34,6 +34,8 @@
|
|||
//</editor-fold>
|
||||
};
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
125
doc/bash_completion.d/yunohost
Normal file
125
doc/bash_completion.d/yunohost
Normal file
|
@ -0,0 +1,125 @@
|
|||
#
|
||||
# completion for yunohost
|
||||
# automatically generated from the actionsmap
|
||||
#
|
||||
|
||||
_yunohost()
|
||||
{
|
||||
local cur prev opts narg
|
||||
COMPREPLY=()
|
||||
|
||||
# the number of words already typed
|
||||
narg=${#COMP_WORDS[@]}
|
||||
|
||||
# the current word being typed
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
|
||||
# If one is currently typing a category,
|
||||
# match with categorys
|
||||
if [[ $narg == 2 ]]; then
|
||||
opts="user domain app backup settings service firewall dyndns tools hook log diagnosis"
|
||||
fi
|
||||
|
||||
# If one already typed a category,
|
||||
# match the actions or the subcategories of that category
|
||||
if [[ $narg == 3 ]]; then
|
||||
# the category typed
|
||||
category="${COMP_WORDS[1]}"
|
||||
|
||||
if [[ $category == "user" ]]; then
|
||||
opts="list create delete update info export import group permission ssh"
|
||||
fi
|
||||
if [[ $category == "domain" ]]; then
|
||||
opts="list add remove dns-conf main-domain cert-status cert-install cert-renew url-available config dns cert"
|
||||
fi
|
||||
if [[ $category == "app" ]]; then
|
||||
opts="catalog search manifest list info map install remove upgrade change-url setting register-url makedefault ssowatconf change-label action config"
|
||||
fi
|
||||
if [[ $category == "backup" ]]; then
|
||||
opts="create restore list info download delete "
|
||||
fi
|
||||
if [[ $category == "settings" ]]; then
|
||||
opts="list get set reset-all reset "
|
||||
fi
|
||||
if [[ $category == "service" ]]; then
|
||||
opts="add remove start stop reload restart reload_or_restart enable disable status log "
|
||||
fi
|
||||
if [[ $category == "firewall" ]]; then
|
||||
opts="list allow disallow upnp reload stop "
|
||||
fi
|
||||
if [[ $category == "dyndns" ]]; then
|
||||
opts="subscribe update "
|
||||
fi
|
||||
if [[ $category == "tools" ]]; then
|
||||
opts="adminpw maindomain postinstall update upgrade shell shutdown reboot regen-conf versions migrations"
|
||||
fi
|
||||
if [[ $category == "hook" ]]; then
|
||||
opts="add remove info list callback exec "
|
||||
fi
|
||||
if [[ $category == "log" ]]; then
|
||||
opts="list show share "
|
||||
fi
|
||||
if [[ $category == "diagnosis" ]]; then
|
||||
opts="list show get run ignore unignore "
|
||||
fi
|
||||
fi
|
||||
|
||||
# If one already typed an action or a subcategory,
|
||||
# match the actions of that subcategory
|
||||
if [[ $narg == 4 ]]; then
|
||||
# the category typed
|
||||
category="${COMP_WORDS[1]}"
|
||||
|
||||
# the action or the subcategory typed
|
||||
action_or_subcategory="${COMP_WORDS[2]}"
|
||||
|
||||
if [[ $category == "user" ]]; then
|
||||
if [[ $action_or_subcategory == "group" ]]; then
|
||||
opts="list create delete info add remove"
|
||||
fi
|
||||
if [[ $action_or_subcategory == "permission" ]]; then
|
||||
opts="list info update add remove reset"
|
||||
fi
|
||||
if [[ $action_or_subcategory == "ssh" ]]; then
|
||||
opts="list-keys add-key remove-key"
|
||||
fi
|
||||
fi
|
||||
if [[ $category == "domain" ]]; then
|
||||
if [[ $action_or_subcategory == "config" ]]; then
|
||||
opts="get set"
|
||||
fi
|
||||
if [[ $action_or_subcategory == "dns" ]]; then
|
||||
opts="suggest push"
|
||||
fi
|
||||
if [[ $action_or_subcategory == "cert" ]]; then
|
||||
opts="status install renew"
|
||||
fi
|
||||
fi
|
||||
if [[ $category == "app" ]]; then
|
||||
if [[ $action_or_subcategory == "action" ]]; then
|
||||
opts="list run"
|
||||
fi
|
||||
if [[ $action_or_subcategory == "config" ]]; then
|
||||
opts="get set"
|
||||
fi
|
||||
fi
|
||||
if [[ $category == "tools" ]]; then
|
||||
if [[ $action_or_subcategory == "migrations" ]]; then
|
||||
opts="list run state"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# If no options were found propose --help
|
||||
if [ -z "$opts" ]; then
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
|
||||
if [[ $prev != "--help" ]]; then
|
||||
opts=( --help )
|
||||
fi
|
||||
fi
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
}
|
||||
|
||||
complete -F _yunohost yunohost
|
|
@ -94,7 +94,7 @@ def main():
|
|||
}
|
||||
},
|
||||
'required': [
|
||||
'password'
|
||||
'credentials'
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ def main():
|
|||
}
|
||||
}
|
||||
},
|
||||
'/install': {
|
||||
'/installed': {
|
||||
'get': {
|
||||
'tags': ['public'],
|
||||
'summary': 'Test if the API is working',
|
||||
|
@ -129,16 +129,6 @@ def main():
|
|||
}
|
||||
}
|
||||
},
|
||||
'components': {
|
||||
'securitySchemes': {
|
||||
'cookieAuth': {
|
||||
'type': 'apiKey',
|
||||
'in': 'cookie',
|
||||
'name': 'session.yunohost.admin'
|
||||
}
|
||||
}
|
||||
},
|
||||
'security': {'cookieAuth': [] }
|
||||
}
|
||||
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue