Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example section in md files contains an extra space #263

Open
pareion opened this issue Sep 18, 2024 · 0 comments
Open

Example section in md files contains an extra space #263

pareion opened this issue Sep 18, 2024 · 0 comments

Comments

@pareion
Copy link

pareion commented Sep 18, 2024

Hello,

When generating the example section with either the md template or md nested template it contains an extra space in the example section. It by itself doesn't matter much, but when autogenerating the documentation and wanting it to pass our linting rules, it becomes quite hurdle some since we'll have to either do some manual intervention or try to auto the removal of it.

Example:
billede

Example schema:

{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "title": "Deployment",
  "type": "object",
  "description": "Deployment info",
  "properties": {
    "global": {
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "type": "object",
      "description": "Region info.",
      "properties": {
        "region": {
          "type": "string",
          "description": "Region to deploy to",
          "default": "westeurope",
          "examples": [
            "westeurope"
          ]
        }
      }
    }
  },
  "additionalProperties": false
}

Suggestion:
Removal of {{ " " }} inside the following two files:
json_schema_for_humans/templates/md/section_examples.md
json_schema_for_humans/templates/md_nested/section_examples.md

And, of course, change the 28 test files containing the **Example(s):**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant