Browse Source

初始化版本

master
ahbmz 4 years ago
parent
commit
c9f0013319
  1. 8
      app/api/controller/Dictionary.php
  2. 8
      app/api/controller/DictionaryType.php
  3. 2
      app/api/controller/Group.php
  4. 8
      app/api/controller/Message.php
  5. 10
      app/api/controller/Swagger.php
  6. 3
      app/api/controller/UploadLog.php
  7. 100
      composer.lock
  8. 1959
      public/openapi.json

8
app/api/controller/Dictionary.php

@ -52,7 +52,7 @@ class Dictionary extends Common
}
/**
* @OA\Post (path="demo/add",tags={"测试案例"},summary="添加DEMO数据",description="添加后台DEMO管理数据",
* @OA\Post (path="dictionary/add",tags={"测试案例"},summary="添加DEMO数据",description="添加后台DEMO管理数据",
* @OA\Parameter(ref="#/components/parameters/token"),
* @OA\RequestBody(
* @OA\MediaType(mediaType="application/json",
@ -86,7 +86,7 @@ class Dictionary extends Common
}
/**
* @OA\Post (path="demo/edit/id/{id}",tags={"测试案例"},summary="修改DEMO数据",description="修改后台DEMO管理数据",
* @OA\Post (path="dictionary/edit/id/{id}",tags={"测试案例"},summary="修改DEMO数据",description="修改后台DEMO管理数据",
* @OA\Parameter(ref="#/components/parameters/token"),
* @OA\RequestBody(
* @OA\MediaType(mediaType="application/json",
@ -122,7 +122,7 @@ class Dictionary extends Common
/**
* @OA\Post (
* path="demo/delete",tags={"测试案例"},summary="删除DEMO数据",description="根据ID删除DEMO信息",
* path="dictionary/delete",tags={"测试案例"},summary="删除DEMO数据",description="根据ID删除DEMO信息",
* @OA\Parameter(ref="#/components/parameters/token"),
* @OA\RequestBody(
* @OA\MediaType(mediaType="application/json",
@ -159,7 +159,7 @@ class Dictionary extends Common
/**
* @OA\Post (
* path="demo/status",tags={"测试案例"},summary="更新DEMO状态",description="根据ID及status更新DEMO状态",
* path="dictionary/status",tags={"测试案例"},summary="更新DEMO状态",description="根据ID及status更新DEMO状态",
* @OA\Parameter(ref="#/components/parameters/token"),
* @OA\RequestBody(
* @OA\MediaType(mediaType="application/json",

8
app/api/controller/DictionaryType.php

@ -56,7 +56,7 @@ class DictionaryType extends Common
}
/**
* @OA\Post (path="demo/add",tags={"测试案例"},summary="添加DEMO数据",description="添加后台DEMO管理数据",
* @OA\Post (path="dictionary_type/add",tags={"测试案例"},summary="添加dictionary_type数据",description="添加后台dictionary_type管理数据",
* @OA\Parameter(ref="#/components/parameters/token"),
* @OA\RequestBody(
* @OA\MediaType(mediaType="application/json",
@ -90,7 +90,7 @@ class DictionaryType extends Common
}
/**
* @OA\Post (path="demo/edit/id/{id}",tags={"测试案例"},summary="修改DEMO数据",description="修改后台DEMO管理数据",
* @OA\Post (path="dictionary_type/edit/id/{id}",tags={"测试案例"},summary="修改dictionary_type数据",description="修改后台dictionary_type管理数据",
* @OA\Parameter(ref="#/components/parameters/token"),
* @OA\RequestBody(
* @OA\MediaType(mediaType="application/json",
@ -126,7 +126,7 @@ class DictionaryType extends Common
/**
* @OA\Post (
* path="demo/delete",tags={"测试案例"},summary="删除DEMO数据",description="根据ID删除DEMO信息",
* path="dictionary_type/delete",tags={"测试案例"},summary="删除DEMO数据",description="根据ID删除DEMO信息",
* @OA\Parameter(ref="#/components/parameters/token"),
* @OA\RequestBody(
* @OA\MediaType(mediaType="application/json",
@ -163,7 +163,7 @@ class DictionaryType extends Common
/**
* @OA\Post (
* path="demo/status",tags={"测试案例"},summary="更新DEMO状态",description="根据ID及status更新DEMO状态",
* path="dictionary_type/status",tags={"测试案例"},summary="更新DEMO状态",description="根据ID及status更新DEMO状态",
* @OA\Parameter(ref="#/components/parameters/token"),
* @OA\RequestBody(
* @OA\MediaType(mediaType="application/json",

2
app/api/controller/Group.php

@ -365,7 +365,7 @@ class Group extends Common
* @OA\Property(
* property="rules",
* type="string",
* description="用户组拥有的规则id, 多个规则","隔开"
* description="用户组拥有的规则id, 多个规则,隔开"
* ),
* @OA\Property(
* property="type",

8
app/api/controller/Message.php

@ -49,7 +49,7 @@ class Message extends Common
}
/**
* @OA\Post (path="demo/add",tags={"测试案例"},summary="添加DEMO数据",description="添加后台DEMO管理数据",
* @OA\Post (path="message/add",tags={"测试案例"},summary="添加message数据",description="添加后台message管理数据",
* @OA\Parameter(ref="#/components/parameters/token"),
* @OA\RequestBody(
* @OA\MediaType(mediaType="application/json",
@ -83,7 +83,7 @@ class Message extends Common
}
/**
* @OA\Post (path="demo/edit/id/{id}",tags={"测试案例"},summary="修改DEMO数据",description="修改后台DEMO管理数据",
* @OA\Post (path="message/edit/id/{id}",tags={"测试案例"},summary="修改message数据",description="修改后台message管理数据",
* @OA\Parameter(ref="#/components/parameters/token"),
* @OA\RequestBody(
* @OA\MediaType(mediaType="application/json",
@ -119,7 +119,7 @@ class Message extends Common
/**
* @OA\Post (
* path="demo/delete",tags={"测试案例"},summary="删除DEMO数据",description="根据ID删除DEMO信息",
* path="message/delete",tags={"测试案例"},summary="删除message数据",description="根据ID删除message信息",
* @OA\Parameter(ref="#/components/parameters/token"),
* @OA\RequestBody(
* @OA\MediaType(mediaType="application/json",
@ -156,7 +156,7 @@ class Message extends Common
/**
* @OA\Post (
* path="demo/status",tags={"测试案例"},summary="更新DEMO状态",description="根据ID及status更新DEMO状态",
* path="message/status",tags={"测试案例"},summary="更新message状态",description="根据ID及status更新message状态",
* @OA\Parameter(ref="#/components/parameters/token"),
* @OA\RequestBody(
* @OA\MediaType(mediaType="application/json",

10
app/api/controller/Swagger.php

@ -3,8 +3,6 @@ declare (strict_types=1);
namespace app\api\controller;
use function OpenApi\scan;
class Swagger
{
/**
@ -12,10 +10,10 @@ class Swagger
*/
public function createFile()
{
$openapi = @scan(dirname(__DIR__));
$spec = json_encode($openapi, JSON_PRETTY_PRINT);
if (file_put_contents('openapi.json', $spec)) {
// echo dirname(__DIR__);exit;
$openapi = \OpenApi\Generator::scan([dirname(__DIR__)]);
header('Content-Type: application/json');
if (file_put_contents('openapi.json', $openapi->toJson())) {
echo 'http://' . \request()->server()['HTTP_HOST'] . '/openapi.json';
}
}

3
app/api/controller/UploadLog.php

@ -21,7 +21,7 @@ class UploadLog extends Common
}
/**
* @OA\Get (
* path="log/index",tags={"上传日志管理"},summary="获取上传日志列表",description="根据相关参数获取日志列表",
* path="uploadLog/index",tags={"上传日志管理"},summary="获取上传日志列表",description="根据相关参数获取日志列表",
* @OA\Parameter(ref="#/components/parameters/token"),
* @OA\Parameter(name="username",in="query",description="管理员名称",@OA\Schema (type="string")),
* @OA\Parameter(name="model",in="query",description="操作模块",@OA\Schema (type="string")),
@ -30,7 +30,6 @@ class UploadLog extends Common
* @OA\Response(
* response=200,
* description="返回管理员用户数据信息",
* @OA\JsonContent(ref="#/components/schemas/LogMsgExport"),
* ),
* ),
*/

100
composer.lock

@ -211,23 +211,24 @@
},
{
"name": "lcobucci/clock",
"version": "2.1.0",
"version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/lcobucci/clock.git",
"reference": "903513d28e85376a33385ebc601afd2ee69e5653"
"reference": "fb533e093fd61321bfcbac08b131ce805fe183d3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/lcobucci/clock/zipball/903513d28e85376a33385ebc601afd2ee69e5653",
"reference": "903513d28e85376a33385ebc601afd2ee69e5653",
"url": "https://api.github.com/repos/lcobucci/clock/zipball/fb533e093fd61321bfcbac08b131ce805fe183d3",
"reference": "fb533e093fd61321bfcbac08b131ce805fe183d3",
"shasum": ""
},
"require": {
"php": "^8.0"
"php": "^8.0",
"stella-maris/clock": "^0.1.4"
},
"require-dev": {
"infection/infection": "^0.25",
"infection/infection": "^0.26",
"lcobucci/coding-standard": "^8.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^0.12",
@ -255,7 +256,7 @@
"description": "Yet another clock abstraction",
"support": {
"issues": "https://github.com/lcobucci/clock/issues",
"source": "https://github.com/lcobucci/clock/tree/2.1.0"
"source": "https://github.com/lcobucci/clock/tree/2.2.0"
},
"funding": [
{
@ -267,7 +268,7 @@
"type": "patreon"
}
],
"time": "2021-10-31T21:32:07+00:00"
"time": "2022-04-19T19:34:17+00:00"
},
{
"name": "lcobucci/jwt",
@ -490,16 +491,16 @@
},
{
"name": "league/mime-type-detection",
"version": "1.9.0",
"version": "1.11.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/mime-type-detection.git",
"reference": "aa70e813a6ad3d1558fc927863d47309b4c23e69"
"reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/aa70e813a6ad3d1558fc927863d47309b4c23e69",
"reference": "aa70e813a6ad3d1558fc927863d47309b4c23e69",
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
"reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
"shasum": ""
},
"require": {
@ -530,7 +531,7 @@
"description": "Mime-type detection for Flysystem",
"support": {
"issues": "https://github.com/thephpleague/mime-type-detection/issues",
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.9.0"
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0"
},
"funding": [
{
@ -542,7 +543,7 @@
"type": "tidelift"
}
],
"time": "2021-11-21T11:48:40+00:00"
"time": "2022-04-17T13:12:02+00:00"
},
{
"name": "psr/cache",
@ -796,17 +797,64 @@
"time": "2017-10-23T01:57:42+00:00"
},
{
"name": "stella-maris/clock",
"version": "0.1.4",
"source": {
"type": "git",
"url": "https://gitlab.com/stella-maris/clock.git",
"reference": "8a0a967896df4c63417385dc69328a0aec84d9cf"
},
"dist": {
"type": "zip",
"url": "https://gitlab.com/api/v4/projects/stella-maris%2Fclock/repository/archive.zip?sha=8a0a967896df4c63417385dc69328a0aec84d9cf",
"reference": "8a0a967896df4c63417385dc69328a0aec84d9cf",
"shasum": ""
},
"require": {
"php": "^7.0|^8.0"
},
"type": "library",
"autoload": {
"psr-4": {
"StellaMaris\\Clock\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Andreas Heigl",
"role": "Maintainer"
}
],
"description": "A pre-release of the proposed PSR-20 Clock-Interface",
"homepage": "https://gitlab.com/stella-maris/clock",
"keywords": [
"clock",
"datetime",
"point in time",
"psr20"
],
"support": {
"issues": "https://gitlab.com/stella-maris/clock/-/issues",
"source": "https://gitlab.com/stella-maris/clock/-/tree/0.1.4"
},
"time": "2022-04-17T14:12:26+00:00"
},
{
"name": "symfony/finder",
"version": "v6.0.3",
"version": "v6.0.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "8661b74dbabc23223f38c9b99d3f8ade71170430"
"reference": "af7edab28d17caecd1f40a9219fc646ae751c21f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/8661b74dbabc23223f38c9b99d3f8ade71170430",
"reference": "8661b74dbabc23223f38c9b99d3f8ade71170430",
"url": "https://api.github.com/repos/symfony/finder/zipball/af7edab28d17caecd1f40a9219fc646ae751c21f",
"reference": "af7edab28d17caecd1f40a9219fc646ae751c21f",
"shasum": ""
},
"require": {
@ -838,7 +886,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/finder/tree/v6.0.3"
"source": "https://github.com/symfony/finder/tree/v6.0.8"
},
"funding": [
{
@ -854,7 +902,7 @@
"type": "tidelift"
}
],
"time": "2022-01-26T17:23:29+00:00"
"time": "2022-04-15T08:07:58+00:00"
},
{
"name": "symfony/polyfill-ctype",
@ -1601,16 +1649,16 @@
},
{
"name": "symfony/var-dumper",
"version": "v4.4.39",
"version": "v4.4.41",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "35237c5e5dcb6593a46a860ba5b29c1d4683d80e"
"reference": "58eb36075c04aaf92a7a9f38ee9a8b97e24eb481"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/35237c5e5dcb6593a46a860ba5b29c1d4683d80e",
"reference": "35237c5e5dcb6593a46a860ba5b29c1d4683d80e",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/58eb36075c04aaf92a7a9f38ee9a8b97e24eb481",
"reference": "58eb36075c04aaf92a7a9f38ee9a8b97e24eb481",
"shasum": ""
},
"require": {
@ -1670,7 +1718,7 @@
"dump"
],
"support": {
"source": "https://github.com/symfony/var-dumper/tree/v4.4.39"
"source": "https://github.com/symfony/var-dumper/tree/v4.4.41"
},
"funding": [
{
@ -1686,7 +1734,7 @@
"type": "tidelift"
}
],
"time": "2022-02-25T10:38:15+00:00"
"time": "2022-04-25T21:15:06+00:00"
},
{
"name": "topthink/think-trace",

1959
public/openapi.json

File diff suppressed because it is too large
Loading…
Cancel
Save