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

Fix warnings during generation due to missing summary and description #178

Merged
merged 1 commit into from
May 29, 2023
Merged

Fix warnings during generation due to missing summary and description #178

merged 1 commit into from
May 29, 2023

Conversation

maxb
Copy link
Contributor

@maxb maxb commented May 27, 2023

Description

Currently, if you run make generate | grep WARN there are thousands of warnings due to endpoints missing summaries or descriptions.

The overwhelming number of warnings makes it harder to spot genuine errors in the templates - e.g. #177.

This change wraps each unconditional reference to summary or description in an {{#if}} to cure the warnings.

How has this been tested?

There are no changes to the generated files as a result of these changes - just the warnings are cured.

Currently, if you run `make generate | grep WARN` there are thousands of
warnings due to endpoints missing summaries or descriptions.

The overwhelming number of warnings makes it harder to spot genuine
errors in the templates - e.g. #177.

This change wraps each unconditional reference to summary or description
in an `{{#if}}` to cure the warnings.
@maxb maxb requested a review from a team May 27, 2023 15:36
Copy link
Collaborator

@averche averche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for fixing these!

@averche averche merged commit b48642a into hashicorp:main May 29, 2023
@maxb maxb deleted the fix-warnings branch May 29, 2023 18:04
dhuckins pushed a commit to hashicorp/vault-client-dotnet that referenced this pull request Jun 9, 2023
This is the vault-client-dotnet counterpart to
hashicorp/vault-client-go#178.

Currently, if you run `make generate | grep 'Unregistered helper name'`
there are 16260 warnings due to endpoints missing various fields in their data models:
```
    192 [main] WARN  o.o.c.t.HandlebarsEngineAdapter - Unregistered helper name 'collectionFormat', processing template:
     54 [main] WARN  o.o.c.t.HandlebarsEngineAdapter - Unregistered helper name 'complexType', processing template:
   3369 [main] WARN  o.o.c.t.HandlebarsEngineAdapter - Unregistered helper name 'description', processing template:
    942 [main] WARN  o.o.c.t.HandlebarsEngineAdapter - Unregistered helper name 'mediaType', processing template:
   1600 [main] WARN  o.o.c.t.HandlebarsEngineAdapter - Unregistered helper name 'notes', processing template:
   7271 [main] WARN  o.o.c.t.HandlebarsEngineAdapter - Unregistered helper name 'returnType', processing template:
   2832 [main] WARN  o.o.c.t.HandlebarsEngineAdapter - Unregistered helper name 'summary', processing template:
```

The overwhelming number of warnings makes it harder to spot genuine
issues occurring.

This change wraps each unconditional reference to these fields in an
`{{#if}}` or `{{#with}}` to cure the warnings.
@averche averche mentioned this pull request Sep 18, 2023
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

Successfully merging this pull request may close these issues.

2 participants