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

Header option seems to not be functional #209

Closed
lisastaehli opened this issue Jan 23, 2020 · 2 comments · Fixed by #225
Closed

Header option seems to not be functional #209

lisastaehli opened this issue Jan 23, 2020 · 2 comments · Fixed by #225

Comments

@lisastaehli
Copy link

What did you do

I tried to remove headers as described in #154 and #153.

What did you expect to happen

That headers will be removed in the generated markdown files.

What happened

The headers were not removed in the generated markdown files. I might be missing some parameters in the schema or the arguments but cannot seem to find the cause of this.

From my understanding, this part of the markdown below should be removed if this is working properly:

---- HEADER -----

Branches Schema

undefined

Example.

Abstract Extensible Status Identifiable Custom Properties Additional Properties Access Restrictions Defined In
Can be instantiated No Unknown status No Forbidden Allowed none branches.json

---- HEADER -----

What's your environment

  • Operating System: Windows
  • node.js version: v12.13.0

Do you have example files:

For this schema

{ 
   "type":"object",
   "title":"Branches",
   "description":"Example.",
   "required":[ 
      "BranchName",
      "BranchOrder",
      "Existing",
      "OwnerName",
      "UrbanEventID"
   ],
   "properties":{ 
      "GlobalID":{ 
         "type":[ 
            "string",
            "null"
         ],
         "description":"Global ID."
      },
      "CreationDate":{ 
         "type":"integer",
         "date":true
      }
   }
}

I'm getting following Markdown when running
jsonschema2md -d docs -o docs/md -h false

Branches Schema

undefined

Example.

Abstract Extensible Status Identifiable Custom Properties Additional Properties Access Restrictions Defined In
Can be instantiated No Unknown status No Forbidden Allowed none branches.json

Branches Type

object (Branches)

Branches Properties

Property Type Required Nullable Defined by
GlobalID string Optional can be null Branches
CreationDate integer Optional cannot be null Branches

GlobalID

Global ID.

GlobalID

  • is optional
  • Type: string
  • can be null
  • defined in: Branches

GlobalID Type

string

CreationDate

CreationDate

  • is optional
  • Type: integer
  • cannot be null
  • defined in: Branches

CreationDate Type

integer

Thanks for the help!

@trieloff trieloff added the bug label Jan 23, 2020
@trieloff
Copy link
Collaborator

Yes, that looks like a bug.

trieloff added a commit that referenced this issue Apr 23, 2020
#209 fix(lib/index.js): made -h/--header a boolean arg
trieloff pushed a commit that referenced this issue Apr 23, 2020
## [4.1.2](v4.1.1...v4.1.2) (2020-04-23)

### Bug Fixes

* **lib/index.js:** made -h/--header a boolean arg ([5ba2719](5ba2719)), closes [#209](#209)
@trieloff
Copy link
Collaborator

🎉 This issue has been resolved in version 4.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

2 participants