Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions regarding GET /plugins/schema/{plugin name} #710

Closed
PGBI opened this issue Nov 10, 2015 · 2 comments
Closed

Questions regarding GET /plugins/schema/{plugin name} #710

PGBI opened this issue Nov 10, 2015 · 2 comments

Comments

@PGBI
Copy link

PGBI commented Nov 10, 2015

I'm currently building a UI client to configure our Kong gateway. To do so, i'm using the GET /plugins/schema/{plugin name} endpoint to build the forms to manage plugins. Most of the time, the response given by this endpoint is self-explanatory.

Here are some cases where I would need some explanation:

GET plugins/schema/key-auth returns:

{
  "fields": {
    "key_names": {
      "type": "array",
      "required": true,
      "default": "function"
    },
    "hide_credentials": {
      "type": "boolean",
      "default": false
    }
  },
  "no_consumer": true
}

What does "default": "function" mean?

GET plugins/schema/oauth2 returns:

{
  "fields": {
    "mandatory_scope": {
      "type": "boolean",
      "required": true,
      "func": "function",
      "default": false
    },
    "...": {},
  },
  "no_consumer": true
}

In this example, what does "func": "function" mean?

GET plugins/schema/acl returns:

{
  "no_consumer": true,
  "fields": {"...":"..."},
  "self_check": "function"
}

What does "self_check": "function" mean?

Thanks a lot!

@thibaultcha
Copy link
Member

When the value is "function" it is because it is a function iirc. Executed in Kong. A function for default means default is chosen from a function. A function for func means the value is validated by a custom function. Etc.

@PGBI PGBI closed this as completed Nov 11, 2015
@PGBI
Copy link
Author

PGBI commented Nov 11, 2015

thanks!

bungle added a commit that referenced this issue Mar 16, 2021
### Summary

#### v1.8.3 — February 9 2021

##### Additions
- Support lazy loading route actions from route name to module name #710
- Add UTF8 helper module, lapis.utf8, for identifying single UTF8 chars and whitespace (lpeg patterns that can be used for trimming and sanitization)
- Add cascade option to postgres drop index schema function

##### Changes
- Remove unused mimetypes dependency
- If yield_error or assert_error are not captured by a outer coroutine then a hard error will happen
- Request\add_params does not need a name
- When searching for OpenResty installation, also accept a binary named openresty (for openresty install on mac with brew)
- pgmoon connection error messages are prefixed with “postgres” to make them easier to identify
- remove excess ; characters in generated SQL for some postgres schema functions
- Postgres create index schema function if_not_exists option will now use the sql clause if not exists instead of running a query to see if the entity exists

##### Misc
- Update test suite to GitHub actions, remove TravisCI. Test suite works across all versions of Lua
-Update docker test suite to latest postgres/mysql

#### v1.8.2 — September 21 2020

##### Additions
- db.delete can take additional arguments for RETURNING, Model\delete method also supports additional arguments to control returning clause
- get_X_paginated model relation method now supports passing where and order options to the paginator constructor

##### Fixes

- Using order and group at the same time with Model\include_in will no longer generate an invalid query
- When running lapis command, the environment is immediately loaded when checking what commands are available for the server, fixes #665
- lapis.nginx.cache can correctly serialize array and boolean types that can result from parameter parsing, fixes 683
- The substring - is no longer matched by accident for route pattern filters #696

#### Changes

- When running in busted, the test environment is set as the default environment any tests are run. It is not longer necessary to have a setup or use_test_env call to configure the environment
- Default buffer size and timout for parsing multipart form data has been increased to allow for slower connections (4k bytes per 5 seconds)
- All logging goes stdout when not running in Nginx
- Compatibility patches for Lua 5.2, 5.3, 5.4
- Improved error message for some lapis commands when using an incomplete configuration
- Improved error message when file can not be written when generating app files
 (Internal) default_environment function moved to lapis.environment module, added set_default_environment function
- Better error message when trying to use belongs_to with composite key (has_one should be used instead)
- Better error when trying to use default composite primary key with a has_one relation
- Misc
- Test suites run across on all versions of Lua on GitHub actions
- Added docs for how request parameters are parsed and merged
- Added docs for how the default environment works
- Fixed bug in docs generator where code snippets were not appearing
- The --trace option for the lapis command is enabled by default when running in test
- Fix minor typos in docs
dndx pushed a commit that referenced this issue Mar 17, 2021
### Summary

#### v1.8.3 — February 9 2021

##### Additions
- Support lazy loading route actions from route name to module name #710
- Add UTF8 helper module, lapis.utf8, for identifying single UTF8 chars and whitespace (lpeg patterns that can be used for trimming and sanitization)
- Add cascade option to postgres drop index schema function

##### Changes
- Remove unused mimetypes dependency
- If yield_error or assert_error are not captured by a outer coroutine then a hard error will happen
- Request\add_params does not need a name
- When searching for OpenResty installation, also accept a binary named openresty (for openresty install on mac with brew)
- pgmoon connection error messages are prefixed with “postgres” to make them easier to identify
- remove excess ; characters in generated SQL for some postgres schema functions
- Postgres create index schema function if_not_exists option will now use the sql clause if not exists instead of running a query to see if the entity exists

##### Misc
- Update test suite to GitHub actions, remove TravisCI. Test suite works across all versions of Lua
-Update docker test suite to latest postgres/mysql

#### v1.8.2 — September 21 2020

##### Additions
- db.delete can take additional arguments for RETURNING, Model\delete method also supports additional arguments to control returning clause
- get_X_paginated model relation method now supports passing where and order options to the paginator constructor

##### Fixes

- Using order and group at the same time with Model\include_in will no longer generate an invalid query
- When running lapis command, the environment is immediately loaded when checking what commands are available for the server, fixes #665
- lapis.nginx.cache can correctly serialize array and boolean types that can result from parameter parsing, fixes 683
- The substring - is no longer matched by accident for route pattern filters #696

#### Changes

- When running in busted, the test environment is set as the default environment any tests are run. It is not longer necessary to have a setup or use_test_env call to configure the environment
- Default buffer size and timout for parsing multipart form data has been increased to allow for slower connections (4k bytes per 5 seconds)
- All logging goes stdout when not running in Nginx
- Compatibility patches for Lua 5.2, 5.3, 5.4
- Improved error message for some lapis commands when using an incomplete configuration
- Improved error message when file can not be written when generating app files
 (Internal) default_environment function moved to lapis.environment module, added set_default_environment function
- Better error message when trying to use belongs_to with composite key (has_one should be used instead)
- Better error when trying to use default composite primary key with a has_one relation
- Misc
- Test suites run across on all versions of Lua on GitHub actions
- Added docs for how request parameters are parsed and merged
- Added docs for how the default environment works
- Fixed bug in docs generator where code snippets were not appearing
- The --trace option for the lapis command is enabled by default when running in test
- Fix minor typos in docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants