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

Improve documentation how to use the Book mode #14

Open
bernhardreiter opened this issue Jan 22, 2025 · 1 comment
Open

Improve documentation how to use the Book mode #14

bernhardreiter opened this issue Jan 22, 2025 · 1 comment
Assignees

Comments

@bernhardreiter
Copy link
Member

The book example does not work in v1.0.0.

@s-l-teichmann
Copy link
Contributor

s-l-teichmann commented Jan 22, 2025

Its works ... I just used it the wrong way. @tschmidtb51

To do it right you have to insert a new type on the top level and reference it later in the document.
E.g to define a mobydick type you have to:

  [types]                                                                             
    [types."mobydick"]                                                                
      type = "book"                                                                   
      path = "mobydick.txt"                                                             
      minlength = 100                                                                 
      maxlength = 1000                                                                
    [types."csaf:#"]                                                                  
      type = "object"   

Later in the template document you can reference it like this

      [[types."csaf:#/properties/document".properties]]                               
        name = "category"                                                             
        required = true                                                               
        type = "mobydick"  

@bernhard-herzog Maybe we should improve the docs a bit?!

@bernhardreiter bernhardreiter changed the title Book mode defect Improve documentation how to use the Book mode Jan 28, 2025
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

2 participants