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

Incorrect type. Expected "object".yaml-schema: TOC #806

Open
jonathaneckman opened this issue Feb 5, 2021 · 2 comments
Open

Incorrect type. Expected "object".yaml-schema: TOC #806

jonathaneckman opened this issue Feb 5, 2021 · 2 comments

Comments

@jonathaneckman
Copy link

After installing the Authoring Pack and adding toc.yml I get the following error on my toc files.

image

@bharney0
Copy link
Contributor

bharney0 commented Feb 24, 2021

@928PJY or @jamarw would either of you be able to look into this issue with docs-yaml extension?I tried to resolve this but wasn't able to change the yaml schema to accept the correct type for TOC.schema. I was under the impression I needed to change this file

This appears to be a problem with all toc.yml that start with name property instead of items:

- name: Docs contributor guide
  href: index.md

vs

items:
- name: Docs contributor guide
  href: index.md

It appears to be pretty common to have toc.yml start with name instead of item. For example, azure-docs-pr has many TOC with - name as starting property

@patware
Copy link

patware commented Mar 5, 2021

Thank you @bharney0, I found your answer while looking for something else.

I believe the error message is misleading, if the schemas specifies there should be an "items:" at the top, the error message should say so, something like "The first item should be items:". Also, the "quick fix" should add it, not display the schema.

The, docfx init creates a toc.yml without the items:, and the documentation DocFx never mentioned this. The init and documentation should be updated to reflect this, but I understand it's another issue.

Thank you for the answer/workaround.

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

3 participants