小编JAM*_*JAM的帖子

Swagger 2.0:如何声明类型模型的定义属性?

我想在Swagger 2.0中声明类型模型的定义属性

这个定义是否正确?(特别是类型:StatusObject部分)

definitions:
  MyObject:
    type: "object"
    properties:
      id:
        type: "number"
      country:
        type: "string"
      status:
        type: StatusObject
  StatusObject:
    type: "object"
    properties:
      code:
        type: "number"
      shortMessage:
        type: "string"
      message:
        type: "string"
Run Code Online (Sandbox Code Playgroud)

谢谢!

models definitions swagger

10
推荐指数
2
解决办法
2万
查看次数

Apache 403 禁止上传文件

当我提交一个带有输入文件的多部分/表单数据表单时,我遇到了一个奇怪的 apache 错误。似乎只有当我上传 70kb 或更大的文件时才会发生。

这是我的 php.ini 设置:

file_uploads = On
upload_max_filesize = 10M
max_execution_time = 90
max_input_time = 90
memory_limit = 196M
post_max_size = 10M
Run Code Online (Sandbox Code Playgroud)

这是 test.php 中的 HTML:

<form action=""  method="POST" enctype="multipart/form-data">
    <input type="file" name="pdfMagazine" />
    <input type="submit" value="Save" name="saveMagazine" />
</form>
Run Code Online (Sandbox Code Playgroud)

这是错误:

Forbidden

You don't have permission to access /test.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 Server …
Run Code Online (Sandbox Code Playgroud)

php apache upload http-status-code-403

2
推荐指数
1
解决办法
1万
查看次数