Skip to content

Commit

Permalink
enh(api): renew API docs and setup API v2 (#615)
Browse files Browse the repository at this point in the history
- adjust setup to make use of the new API extractor
- add all needed types to extract API v1
- setup structure and first endpoints for API v2

add selection column description and test it



fix php 7.4 backwards compatibility



add tests for basic column creations



add a endpoint to request column objects



update openapi.json



make psalm return type more precise



fix psalm types recognition



fix route



cleanup debug info



Cleanup annotations



Hide sensitive data from showing to the users.



Refactor OCS-API-Controller to abstract class



Update lib/Db/Column.php




Update lib/Controller/ApiGeneralController.php




Update lib/Controller/ApiTablesController.php




Update lib/Controller/ApiTablesController.php




Update lib/Controller/MyOCSController.php




add specific endpoints to create different columns by type
- fix error handling in ColumnService.php



add basic integration tests for the api v2 table endpoints



fix api routes & update API docs



cypress fix typo



initial new API setup
- introduce api v2
- organise API methods in own controllers
- Add virtual version tag to the names in docs
- use OCS routes and controllers



Setup skeleton to keep old api v1 and setup v2 with integration testing



try to use php8.1 for over all CI



add openapi.json



CI settings



Make use of automated API doc generating
- add annotations for API routed methods
- refactor to ensure type safety
- add psalm types and usage
- correct API return codes ⚡️breaking changes ⚡️

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>
  • Loading branch information
Florian authored Nov 13, 2023
1 parent 3010f08 commit e53bc51
Show file tree
Hide file tree
Showing 35 changed files with 10,235 additions and 3,889 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,9 @@ jobs:
matrix:
node-version: [ 16 ]
databases: [ 'mysql' ]
server-versions: [ 'stable25', 'master' ]
server-versions: [ 'stable25', 'stable27', 'master' ]
include:
- php-versions: 8.1
- server-versions: 'stable25'
php-versions: 7.4


services:
mysql:
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,12 @@ jobs:
strategy:
fail-fast: false
matrix:
server-versions: ['stable25', 'stable26', 'stable27', 'master']
server-versions: ['stable25', 'stable27', 'master']
include:
- php-versions: '8.2'
- php-versions: '8.1'
- server-versions: 'stable25'
php-versions: '7.4'
databases: 'sqlite'
- server-versions: 'stable26'
php-versions: '8.1'
databases: 'mysql'
- server-versions: 'stable27'
php-versions: '8.1'
databases: 'mysql'
- server-versions: 'master'
databases: 'sqlite'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-php-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up php
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
with:
php-version: 8.0
php-version: 8.1
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
coverage: none
ini-file: development
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/phpunit-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ jobs:

strategy:
matrix:
server-versions: ['stable25', 'master']
server-versions: ['stable25', 'stable27', 'master']
include:
- php-versions: 8.1
- server-versions: 'stable25'
php-versions: 7.4

services:
mysql:
Expand Down
Loading

0 comments on commit e53bc51

Please sign in to comment.