swagger-php

Swagger PHP - how to define a nested property?

牧云@^-^@ 提交于 2019-12-01 17:40:18
I'm using Swagger PHP and most of the definitions are easy to define, but I'm having an issue with a particular piece of data that is not part of a seperate class, but instead an associative array. The json response I wish to show (simplified for this question): { "id": 1, "status": "published", "gps": { "lat": "0.00000000", "lng": "0.00000000" } The id and status are easy enough to define, however the gps is a problem as there is no seperate class to define it in, it is an array inside the model. Is it possible to define this array without having to create a dummy class? The comments in the

Swagger PHP - how to define a nested property?

Deadly 提交于 2019-12-01 16:49:35
问题 I'm using Swagger PHP and most of the definitions are easy to define, but I'm having an issue with a particular piece of data that is not part of a seperate class, but instead an associative array. The json response I wish to show (simplified for this question): { "id": 1, "status": "published", "gps": { "lat": "0.00000000", "lng": "0.00000000" } The id and status are easy enough to define, however the gps is a problem as there is no seperate class to define it in, it is an array inside the

Converting Swagger specification JSON to HTML documentation

雨燕双飞 提交于 2019-11-28 16:28:29
For some REST APIs written in PHP, I was asked to create Swagger documentation, and since I was not aware of any easy way of adding annotations to those existing APIs and create such a documentation, I used this editor to generate some for now. I saved the JSON and YAML files created using that editor, and now I need to create the final interactive Swagger documentation (this statement might sound naive and vague). Can someone please let me know how I can convert the Swagger JSON specification file to actual Swagger documentation? I am on the Windows platform and do not know anything about Ant

Converting Swagger specification JSON to HTML documentation

梦想的初衷 提交于 2019-11-27 09:34:31
问题 For some REST APIs written in PHP, I was asked to create Swagger documentation, and since I was not aware of any easy way of adding annotations to those existing APIs and create such a documentation, I used this editor to generate some for now. I saved the JSON and YAML files created using that editor, and now I need to create the final interactive Swagger documentation (this statement might sound naive and vague). Can someone please let me know how I can convert the Swagger JSON