Skip to content

Commit

Permalink
refactor(OpenApi): Remove unused schema
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <[email protected]>
  • Loading branch information
provokateurin committed Dec 20, 2024
1 parent 08b6b48 commit 2402174
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 29 deletions.
17 changes: 13 additions & 4 deletions lib/Model/BotServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace OCA\Talk\Model;

use OCA\Talk\ResponseDefinitions;
use OCP\AppFramework\Db\Entity;
use OCP\DB\Types;

Expand All @@ -33,8 +32,6 @@
* @method int getState()
* @method void setFeatures(int $features)
* @method int getFeatures()
*
* @psalm-import-type TalkBotWithDetailsAndSecret from ResponseDefinitions
*/
class BotServer extends Entity implements \JsonSerializable {
protected string $name = '';
Expand Down Expand Up @@ -62,7 +59,19 @@ public function __construct() {
}

/**
* @return TalkBotWithDetailsAndSecret
* @return array{
* id: int,
* name: string,
* url: string,
* url_hash: string,
* description: ?string,
* secret: string,
* error_count: int,
* last_error_date: int,
* last_error_message: string,
* state: int,
* features: int,
* }
*/
public function jsonSerialize(): array {
return [
Expand Down
4 changes: 0 additions & 4 deletions lib/ResponseDefinitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@
* url_hash: string,
* }
*
* @psalm-type TalkBotWithDetailsAndSecret = TalkBotWithDetails&array{
* secret: string,
* }
*
* @psalm-type TalkCallPeer = array{
* actorId: string,
* actorType: string,
Expand Down
18 changes: 0 additions & 18 deletions openapi-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,24 +189,6 @@
}
]
},
"BotWithDetailsAndSecret": {
"allOf": [
{
"$ref": "#/components/schemas/BotWithDetails"
},
{
"type": "object",
"required": [
"secret"
],
"properties": {
"secret": {
"type": "string"
}
}
}
]
},
"CallPeer": {
"type": "object",
"required": [
Expand Down
3 changes: 0 additions & 3 deletions src/types/openapi/openapi-full.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1962,9 +1962,6 @@ export type components = {
url: string;
url_hash: string;
};
BotWithDetailsAndSecret: components["schemas"]["BotWithDetails"] & {
secret: string;
};
CallPeer: {
actorId: string;
actorType: string;
Expand Down

0 comments on commit 2402174

Please sign in to comment.