-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for legacy style names (#15384)
Long term I want to introduce a new snake_case based naming system to schemas. There's an internal design doc about this at https://docs.google.com/document/d/1ns07htpLjw0dJPn5p7TBPVULvwwYc1Pl7l1c1jdGXoY/edit. As part of that we get the nice feature that _nearly_ all current names are either valid and the same in both system (e.g. "foo"), or they look different in the current system (e.g. "fooBar"). But there are a handful of odd cases where we have providers using names that look like they should be new style snake case names (e.g. kubernetes has a load of "x_kubernetes_" properties). To provide a way to ensure k8s can stay on the current name generation (even though it gives pretty odd results) this change adds a test with a schema demonstrating a load of snake_case names. When we do add the new naming system this test _should not diff_, excepting possibly setting an option if the new naming system is opt-out rather than opt-in.
- Loading branch information
Showing
54 changed files
with
3,619 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
pkg/codegen/testing/test/testdata/legacy-names/docs/HTTP_module/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: "HTTP_module" | ||
title_tag: "legacy_names.HTTP_module" | ||
meta_desc: "Explore the resources and functions of the legacy_names.HTTP_module module." | ||
layout: api | ||
no_edit_this_page: true | ||
--- | ||
|
||
<!-- WARNING: this file was generated by test. --> | ||
<!-- Do not edit by hand unless you're certain you know what you are doing! --> | ||
|
||
Explore the resources and functions of the legacy_names.HTTP_module module. | ||
|
||
<h2 id="package-details">Package Details</h2> | ||
<dl class="package-details"> | ||
<dt>Repository</dt> | ||
<dd><a href="">legacy_names </a></dd> | ||
<dt>License</dt> | ||
<dd></dd> | ||
<dt>Version</dt> | ||
<dd>1.0.0</dd> | ||
</dl> | ||
|
34 changes: 34 additions & 0 deletions
34
pkg/codegen/testing/test/testdata/legacy-names/docs/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: "legacy_names" | ||
title_tag: "legacy_names Package" | ||
meta_desc: "" | ||
layout: api | ||
no_edit_this_page: true | ||
--- | ||
|
||
<!-- WARNING: this file was generated by test. --> | ||
<!-- Do not edit by hand unless you're certain you know what you are doing! --> | ||
|
||
|
||
|
||
<h2 id="modules">Modules</h2> | ||
<ul class="api"> | ||
<li><a href="http_module/" title="HTTP_module">HTTP_module</a></li> | ||
</ul> | ||
|
||
<h2 id="resources">Resources</h2> | ||
<ul class="api"> | ||
<li><a href="example_resource/" title="Example_resource">Example_resource</a></li> | ||
<li><a href="provider/" title="Provider">Provider</a></li> | ||
</ul> | ||
|
||
<h2 id="package-details">Package Details</h2> | ||
<dl class="package-details"> | ||
<dt>Repository</dt> | ||
<dd><a href="">legacy_names </a></dd> | ||
<dt>License</dt> | ||
<dd></dd> | ||
<dt>Version</dt> | ||
<dd>1.0.0</dd> | ||
</dl> | ||
|
8 changes: 8 additions & 0 deletions
8
pkg/codegen/testing/test/testdata/legacy-names/docs/codegen-manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"emittedFiles": [ | ||
"HTTP_module/_index.md", | ||
"_index.md", | ||
"example_resource/_index.md", | ||
"provider/_index.md" | ||
] | ||
} |
758 changes: 758 additions & 0 deletions
758
pkg/codegen/testing/test/testdata/legacy-names/docs/example_resource/_index.md
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.