No description
This repository has been archived on 2026-11-17. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
2024-07-15 12:07:01 +02:00
Symfony-api-doc-generator fix regex if json starts with a array 2022-08-18 08:49:57 +02:00
.gitignore add .idea folder to gitignore 2022-08-17 17:18:32 +02:00
.gitlab-ci.yml update pipeline for docker based windows builds 2024-07-15 12:07:01 +02:00
LICENSE Add GPL 3 license. 2024-07-15 12:02:52 +02:00
Readme.md Fix Link to Apple Silicon Executable 2022-08-17 23:26:04 +02:00
Symfony-api-doc-generator.sln init 2022-08-17 17:18:05 +02:00

Symfony API Documentation Generator

This is a simple .NET CLI tool, which parses a JSON file and returns the annotations needed for the NelmioApiDocBundle.

Usage

Open the Application from the CLI, then paste your JSON and press two times return. Now you get the Annotations matching your JSON. Please note values with null won't get any type.

Downloads

Example

Input

{
  "id": 4051,
  "name": "manoj",
  "email": "manoj@gmail.com",
  "password": "Test@123",
  "about": null,
  "token": "7f471974-ae46-4ac0-a882-1980c300c4d6",
  "country": null,
  "location": null,
  "dob": null,
  "gender": 0,
  "userType": 1,
  "userStatus": 1,
  "profilePicture": "Images/9b291404-bc2e-4806-88c5-08d29e65a5ad.png",
  "coverPicture": "Images/44af97d9-b8c9-4ec1-a099-010671db25b7.png",
  "enablefollowme": false,
  "sendmenotifications": false,
  "sendTextmessages": false,
  "enabletagging": false,
  "createdAt": "2020-01-01T11:13:27.1107739",
  "updatedAt": "2020-01-02T09:16:49.284864",
  "coordinates": {
    "lng": 77.389849,
    "lat": 28.6282231
  },
  "liveLocation": [
    "Unnamed Road",
    "Chhijarsi",
    "Sector 63",
    "Noida",
    "Uttar Pradesh 201307",
    "India"
  ],
  "creditBalance": 127,
  "myCash": 0,
  "testarray": [
    {
      "name": "Max",
      "mail": "max@mustermann.de"
    },
    {
      "name": "John",
      "mail": "john@doe.com"
    }
  ]
}

Output

* @OA\JsonContent(
*   type="object",
*   @OA\Property(
*     property="id"
*     type="integer",
*     example="4051"
*   ),
*   @OA\Property(
*     property="name"
*     type="string",
*     example="manoj"
*   ),
*   @OA\Property(
*     property="email"
*     type="string",
*     example="manoj@gmail.com"
*   ),
*   @OA\Property(
*     property="password"
*     type="string",
*     example="Test@123"
*   ),
*   @OA\Property(
*     property="about"
*   ),
*   @OA\Property(
*     property="token"
*     type="string",
*     example="7f471974-ae46-4ac0-a882-1980c300c4d6"
*   ),
*   @OA\Property(
*     property="country"
*   ),
*   @OA\Property(
*     property="location"
*   ),
*   @OA\Property(
*     property="dob"
*   ),
*   @OA\Property(
*     property="gender"
*     type="integer",
*     example="0"
*   ),
*   @OA\Property(
*     property="userType"
*     type="integer",
*     example="1"
*   ),
*   @OA\Property(
*     property="userStatus"
*     type="integer",
*     example="1"
*   ),
*   @OA\Property(
*     property="profilePicture"
*     type="string",
*     example="Images/9b291404-bc2e-4806-88c5-08d29e65a5ad.png"
*   ),
*   @OA\Property(
*     property="coverPicture"
*     type="string",
*     example="Images/44af97d9-b8c9-4ec1-a099-010671db25b7.png"
*   ),
*   @OA\Property(
*     property="enablefollowme"
*     type="boolean",
*     example="false"
*   ),
*   @OA\Property(
*     property="sendmenotifications"
*     type="boolean",
*     example="false"
*   ),
*   @OA\Property(
*     property="sendTextmessages"
*     type="boolean",
*     example="false"
*   ),
*   @OA\Property(
*     property="enabletagging"
*     type="boolean",
*     example="false"
*   ),
*   @OA\Property(
*     property="createdAt"
*   ),
*   @OA\Property(
*     property="updatedAt"
*   ),
*   @OA\Property(
*     property="coordinates"
*     type="object",
*     @OA\Property(
*       property="lng"
*     ),
*     @OA\Property(
*       property="lat"
*     ),
*   ),
*   @OA\Property(
*     property="liveLocation"
*     type="array",
*     @OA\Items(
*       type="string",
*       example="Unnamed Road"
*     ),
*   ),
*   @OA\Property(
*     property="creditBalance"
*     type="integer",
*     example="127"
*   ),
*   @OA\Property(
*     property="myCash"
*     type="integer",
*     example="0"
*   ),
*   @OA\Property(
*     property="testarray"
*     type="array",
*     @OA\Items(
*       type="object",
*       @OA\Property(
*         property="name"
*         type="string",
*         example="Max"
*       ),
*       @OA\Property(
*         property="mail"
*         type="string",
*         example="max@mustermann.de"
*       ),
*     ),
*   ),
* ),