oslokommune / ok

Infrastructure toolbox 👌
https://km.oslo.systems
1 stars 0 forks source link

IntelliJ does not show comments from JSON schema #222

Open yngvark opened 2 months ago

yngvark commented 2 months ago

Some random testing locally:

$ ok pkg add app app-lol
2024/09/09 10:29:34 WARN could not transform default map type to schema type variable=IamForCicd.AppGitHubRepo
2024/09/09 10:29:34 WARN could not transform default map type to schema type variable=IamForCicd.IacGitHubRepo
2024/09/09 10:29:34 INFO writing schema file path=_config/app-v8.0.4.schema.json configDir=_config schemaId=boilerplate/terraform/app-app-v8.0.4
2024/09/09 10:29:34 INFO app (v8.0.4) added to packages.yml with output folder name app-lol

Unfortunately, IntelliJ does not understand this structure:

image

Though this works:

image

yngvark commented 2 months ago

Solution (irrelevant of IDE):

    "AlbHostRouting": {
      "type": "object",
      "description": "Add ALB host routing.",
      "default": {
        "Enable": false,
        "Internal": true
      },
      "properties": {
        "Enable": {
          "type": "boolean",
          "default": false,
          "description": "Add ALB host routing222222222222222222222222222."
        },
        "Internal": {
          "type": "boolean",
          "default": true
        }
      },
      "required": [
        "Enable",
        "Internal"
      ]
    },