crossplane / crossplane/upjet

docs scraper not handling markdown with omitted optional yaml front matter

Open
#155 6 comments 1 reaction 0 assignees View on GitHub
bug docgen v2
Dominant language
Go
Stars
481
Forks
131
Avg merge
2d 1h
Merged PRs (30d)
11

Description

### What happened?
While investing scraper for https://github.com/crossplane-contrib/provider-jet-equinix/pull/18 and processing https://raw.githubusercontent.com/equinix/terraform-provider-equinix/master/docs/resources/equinix_ecx_l2_connection.md,
```
scraper: error: Failed to scrape Terraform provider metadata: cannot scrape Terraform registry: failed to scrape resource metadata from path: ../.work/equinix/equinix/docs/resources/equinix_ecx_l2_connection.md: failed to find the prelude of the document using the xpath expressions: //text()[contains(., "description") and contains(., "page_title")]
```

According to https://developer.hashicorp.com/terraform/registry/providers/docs#yaml-frontmatter, `page_title` is optional.

Does scraper know how to handle the Markdown documents and formatting described here? https://developer.hashicorp.com/terraform/registry/providers/docs#format

### How can we reproduce it?

Checkout https://github.com/crossplane-contrib/provider-jet-equinix/pull/18/commits/97eb823e70fd751ff0265128a6db4dfbad9d8909

run `make generate`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.