| #
d48c2b25 |
| 07-Jan-2024 |
Andreas Gohr <andi@splitbrain.org> |
API: code style fixes
|
| #
7de5ac55 |
| 06-Jan-2024 |
Andreas Gohr <andi@splitbrain.org> |
Another argument parsing fix for ApiCall
When using named parameters, you can expect to be able to leave out any optional parameter and have it take it's default, even when you specify another "late
Another argument parsing fix for ApiCall
When using named parameters, you can expect to be able to leave out any optional parameter and have it take it's default, even when you specify another "later" parameter. Luckily we already know all the defaults from reflection anyway.
show more ...
|
| #
04acbb6f |
| 06-Jan-2024 |
Andreas Gohr <andi@splitbrain.org> |
API: fix named parameter handling in APICall
We cannot set missing paramerers to null. We need to make sure they are not set at all.
|
| #
6cce3332 |
| 05-Jan-2024 |
Andreas Gohr <andi@splitbrain.org> |
Reworked API definition
This cleans up the API:
* no more compatibility with obsolete wiki API * no more difference between wiki.* and dokuwiki.* calls -> core.* * use of optional parameters avoids
Reworked API definition
This cleans up the API:
* no more compatibility with obsolete wiki API * no more difference between wiki.* and dokuwiki.* calls -> core.* * use of optional parameters avoids double definitions * use Response objects for complex results * always use named primitives as input * major cleanup of docblock descriptions
show more ...
|
| #
dd7472d3 |
| 04-Jan-2024 |
Andreas Gohr <andi@splitbrain.org> |
OpenAPI Gen: handle Object to Schema transformation correctly
All the basic mechanisms should now be in place to clean up the API
|
| #
8ddd9b69 |
| 22-Dec-2023 |
Andreas Gohr <andi@splitbrain.org> |
OpenAPI Generator. Better DocBlock parsing [WIP]
This introduces a new DocBlock parser to properly generate API specifications. It also introduces the concept of Response classes to better specify t
OpenAPI Generator. Better DocBlock parsing [WIP]
This introduces a new DocBlock parser to properly generate API specifications. It also introduces the concept of Response classes to better specify the response format.
This is still very much in progress.
show more ...
|
| #
66f07661 |
| 07-Dec-2023 |
Andreas Gohr <andi@splitbrain.org> |
OpenAPI Gen: @link tag, examples for known params
|
| #
b05603ab |
| 01-Dec-2023 |
Andreas Gohr <andi@splitbrain.org> |
fix type parsing for more complex types
|
| #
1468a128 |
| 01-Dec-2023 |
Andreas Gohr <andi@splitbrain.org> |
Fix first set of API tests
|
| #
42e66c7a |
| 30-Nov-2023 |
Andreas Gohr <andi@splitbrain.org> |
First go at refactoring the API mechanisms
This introduces an ApiCall class that wraps around the actual method that produces the result. This replaces various loose array structures that provided t
First go at refactoring the API mechanisms
This introduces an ApiCall class that wraps around the actual method that produces the result. This replaces various loose array structures that provided the meta information before.
The ApiCall streamlines the aggregation of meta information between core and plugin methods. Now all data is produced by Reflection based introspection. Certain aspects can be overridden if needed. See ApiCore::getRemoteInfo() for examples
This change removes the _getMethods() method from remote plugins and introduces a getMethods() method. The two are NOT compatible as the latter now returns a list of ApiCalls. However when looking at the existing plugins, it seems that _getMethods() was nearly 100% obsolete with the Reflection based default implementation. So most plugins will not be affected at all. Some might now export one or two more methods than before because of poor visibility settings (eg. not declaring private/protected methods as such).
This change removes the RPC_CALL_ADD hook. Only a single plugin ever implemented it. I'm not sure what this hook was supposed to do anyway. Being able to declare arbitrarily named API endpoints seems wrong to me anyway.
The new ApiCall now also supports passing named instead of positional parameters. This will open up a new opportunity to get a proper openapi spec running.
Next step is fixing the tests.
show more ...
|