Skip to content

Commit

Permalink
enh(api): renew API docs and setup API v2
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

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

fix php 7.4 backwards compatibility

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

add tests for basic column creations

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

add a endpoint to request column objects

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

update openapi.json

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

make psalm return type more precise

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

fix psalm types recognition

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

fix route

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

cleanup debug info

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

Cleanup annotations

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

Hide sensitive data from showing to the users.

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

Refactor OCS-API-Controller to abstract class

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

Update lib/Db/Column.php

Co-authored-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Florian <florian.steffens@nextcloud.com>

Update lib/Controller/ApiGeneralController.php

Co-authored-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Florian <florian.steffens@nextcloud.com>

Update lib/Controller/ApiTablesController.php

Co-authored-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Florian <florian.steffens@nextcloud.com>

Update lib/Controller/ApiTablesController.php

Co-authored-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Florian <florian.steffens@nextcloud.com>

Update lib/Controller/MyOCSController.php

Co-authored-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Florian <florian.steffens@nextcloud.com>

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

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

add basic integration tests for the api v2 table endpoints

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

fix api routes & update API docs

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

cypress fix typo

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

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

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

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

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

try to use php8.1 for over all CI

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

add openapi.json

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

CI settings

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

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 Steffens committed Nov 9, 2023
1 parent 0bd7821 commit 046e7ec
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 046e7ec

Please sign in to comment.