Skip to content

Consider separating brief and expanded typs on json export #653

@badosu

Description

@badosu

I've ran my generator on 9924098 and it seems to expand typs a lot more, see:

in inherits:
Image

in field:
Image

When handling the json export I only want the true type, so that I can choose how to present it. If an alternative description of the type is required for presentation purposes then it should be separated from the actual type, as I see it.

Current output samples:

    {
      "type": "class",
      "name": "RulesSyncedCallins",
      "description": "Callins that are sent to the synced lua file: `LuaRules/main.lua`",
      "visibility": null,
      "deprecated": false,
      "deprecation_reason": null,
      "tag_content": null,
      "loc": [
        {
          "file": "/home/badosu/Code/spring/rts/Lua/library/RulesSyncedCallins.lua",
          "line": 5
        }
      ],
      "bases": [
        "Callins {\n    Initialize = function,\n    LoadCode = function,\n    Shutdown = function,\n    GotChatMsg = function,\n    Load = function,\n    GamePreload = function,\n    GameStart = function,\n    GameOver = function,\n    GamePaused = function,\n    GameFrame = function,\n    GameFramePost = function,\n    GameID = function,\n    ...(+111)\n}",
        "UnsyncedCallins {\n    RecvFromSynced = function,\n    DrawUnit = function,\n    DrawFeature = function,\n    DrawShield = function,\n    DrawProjectile = function,\n    DrawMaterial = function,\n}",
        "SyncedCallins {\n    CommandFallback = function,\n    AllowCommand = function,\n    AllowUnitCreation = function,\n    AllowUnitTransfer = function,\n    AllowUnitBuildStep = function,\n    AllowUnitCaptureStep = function,\n    AllowUnitTransport = function,\n    AllowUnitTransportLoad = function,\n    AllowUnitTransportUnload = function,\n    AllowUnitCloak = function,\n    AllowUnitCloak = function,\n    AllowUnitKamikaze = function,\n    ...(+16)\n}"
      ],
      "generics": [],
      "members": []
    },
        {
          "type": "field",
          "name": "textColorCodes",
          "description": "Table containing keys that represent the color code operations during font rendering",
          "visibility": null,
          "deprecated": false,
          "deprecation_reason": null,
          "tag_content": null,
          "loc": {
            "file": "/home/badosu/Code/spring/rts/Lua/library/generated/rts/Lua/LuaConstGame.cpp.lua",
            "line": 226
          },
          "typ": "TextColorCode {\n    Color = string,\n    ColorAndOutline = string,\n    Reset = string,\n}",
          "literal": null
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions