Skip to content

[Bug] REST API docs source files will not process #9157

@cedar-ave

Description

@cedar-ave

Describe the bug
Since this commit (as best I can tell), which is part of release v2.70.1, and is accompanied by the release note "Add type definition to REST API pages," none of our Swagger JSON files will process. This error is thrown for each file:

error ApplyTemplatePreprocessorError: Error transforming model generated from "swagger-file.json" using "RestApi.html.primary.js". To get the detailed raw model, please run docfx with debug mode --debug. Error running Transform function inside template preprocessor: Cannot read property 'forEach' of undefined

To Reproduce
Steps to reproduce the behavior:

  1. Place Swagger JSON files in a /restapi directory
  2. Include /restapi in docfx.json
  3. Run docfx build

Expected behavior
I would expect the Swagger JSON file to be transformed into HTML REST API reference pages. This has been the case for a long time until this release.

Context (please complete the following information):

  • OS: Windows
  • Docfx version: 2.70.1

Additional context
Thank you for any help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    rest-apiGenerate REST API documentation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions