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

tools/importer-rest-api-specs: refactoring the Parser package #4307

Merged
merged 58 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
f255687
`tools/importer-rest-api-specs`: refactoring the `commonschema` Match…
tombuildsstuff Jul 4, 2024
0d1ab7f
`tools/importer-rest-api-specs`: refactoring the Constant package
tombuildsstuff Jul 4, 2024
33321b6
`tools/importer-rest-api-specs`: porting the Network workaround into …
tombuildsstuff Jul 5, 2024
5eea5fe
`tools/importer-rest-api-specs`: porting the `dataworkarounds` packag…
tombuildsstuff Jul 5, 2024
bcb98ac
`tools/importer-rest-api-specs`: scaffolding out the logic to parse a…
tombuildsstuff Jul 5, 2024
fdd6a18
`tools/importer-rest-api-specs`: porting over the "remove unused item…
tombuildsstuff Jul 5, 2024
d86c9be
`tools/importer-rest-api-specs`: adding a shim to the updated `datawo…
tombuildsstuff Jul 5, 2024
dc3da36
dependencies: updating to `v0.69.0` of `github.com/hashicorp/go-azure…
tombuildsstuff Jul 5, 2024
f315a58
`tools/importer-rest-api-specs`: refactoring the `normalization` pack…
tombuildsstuff Jul 5, 2024
4fc8d23
`tools/importer-rest-api-specs`: moving all of the `cleanup` items in…
tombuildsstuff Jul 5, 2024
2238e45
`tools/importer-rest-api-specs`: adding inner most sdk operation obje…
tombuildsstuff Jul 5, 2024
868c6be
`tools/importer-rest-api-specs`: moving the `commonids` into a subpac…
tombuildsstuff Jul 5, 2024
f316c93
`tools/data-api-sdk`: removing an empty todo file
tombuildsstuff Jul 5, 2024
5421539
`tools/importer-rest-api-specs`: refactoring more logic out to the ne…
tombuildsstuff Jul 5, 2024
022aa27
`tools/importer-rest-api-specs`: moving another `ignore` function
tombuildsstuff Jul 5, 2024
7da937c
WIP
tombuildsstuff Jul 9, 2024
9041a95
tools/importer-rest-api-specs: reimplementing #4290 atop the rebase
tombuildsstuff Jul 10, 2024
5ac3c6b
`tools/importer-rest-api-specs`: adding a placeholder for parsing an …
tombuildsstuff Jul 10, 2024
1c24bf8
`tools/importer-rest-api-specs`: refactoring the parser into smaller …
tombuildsstuff Jul 12, 2024
2a0a72a
`tools/importer-rest-api-specs`: fixing an issue where the `validate`…
tombuildsstuff Jul 12, 2024
1f89c95
`tools/importer-rest-api-specs`: title-casing the ReferenceName - whi…
tombuildsstuff Jul 12, 2024
1c27957
`tools/importer-rest-api-specs`: ensuring that TypeSpec examples are …
tombuildsstuff Jul 12, 2024
e19ecbc
`tools/importer-rest-api-specs`: trimming `*.json` from the filename …
tombuildsstuff Jul 12, 2024
84e3913
`tools/importer-rest-api-specs`: removing (most) of the old code path
tombuildsstuff Jul 12, 2024
41b548a
`tools/data-api-sdk`: making IsCommonType required so this is more ex…
tombuildsstuff Jul 12, 2024
61de948
`tools/importer-rest-api-specs`: fixing the validation
tombuildsstuff Jul 12, 2024
b05c0cf
`tools/importer-rest-api-specs`: re-enabling most of the tests
tombuildsstuff Jul 12, 2024
b77acef
`tools/importer-rest-api-specs`: consolidating/porting over the data …
tombuildsstuff Jul 15, 2024
58f5bae
`tools/importer-rest-api-specs`: fixing the test format
tombuildsstuff Jul 15, 2024
fe98217
tools/importer-rest-api-specs: skipping the local test
tombuildsstuff Jul 15, 2024
26268db
`tools/importer-rest-api-specs`: fixing the non-discriminator tests
tombuildsstuff Jul 15, 2024
9643f43
`tools/importer-rest-api-specs`: updating/reworking the supplementary…
tombuildsstuff Jul 15, 2024
898d028
`importer-rest-api-specs`: fix up discriminator handling for datafactory
manicminer Jul 17, 2024
4412616
`importer-rest-api-specs`: shelve SupplementaryData support for now, …
manicminer Jul 17, 2024
8526060
`importer-rest-api-specs`: implement `-services` argument
manicminer Jul 17, 2024
b585e84
`importer-rest-api-specs`: operate on maps instead of passing them ar…
manicminer Jul 17, 2024
6507fde
`importer-rest-api-specs`: normalize swagger tag names to prevent dup…
manicminer Jul 18, 2024
170e490
`importer-rest-api-specs`: normalize API resources after parsing all …
manicminer Jul 18, 2024
42b4244
`importer-rest-api-specs`: ensure new APIResource is populated
manicminer Jul 18, 2024
9d49558
`importer-rest-api-specs`: maps are pointers
manicminer Jul 19, 2024
dccc285
`importer-rest-api-specs`: dereference more maps
manicminer Jul 19, 2024
cc8d566
`importer-rest-api-specs`: remove use of strings.Title, dereference m…
manicminer Jul 19, 2024
0c29e2b
limit scope of SDK generation test to the SDK being tested
manicminer Jul 19, 2024
6af799d
`importer-rest-api-specs`: two loops become one
manicminer Jul 19, 2024
be21531
`importer-rest-api-specs`: workaround inconsistent casing of "Virtual…
manicminer Jul 19, 2024
530ffaf
Revert "`importer-rest-api-specs`: two loops become one"
manicminer Jul 19, 2024
5422698
`importer-rest-api-specs`: normalize "attachednetworks" segment of re…
manicminer Jul 19, 2024
a96d443
Revert "`tools/data-api-sdk`: making IsCommonType required so this is…
manicminer Sep 25, 2024
eaa8229
importer-rest-api-specs: use updated forks for `go-openapi/analysis`,…
manicminer Oct 1, 2024
ef8b51d
importer-rest-api-specs: remove Supplementary Data parser as is not u…
manicminer Oct 1, 2024
bb6631c
importer-rest-api-specs: rework the swagger spec parser and manually …
manicminer Oct 1, 2024
2d11e96
importer-rest-api-specs: fix format string, ensure model names are UR…
manicminer Oct 1, 2024
dbcf1ab
importer-rest-api-specs: updated tests for discriminated models to ex…
manicminer Oct 1, 2024
8fc6c76
importer-rest-api-specs: remove vestiges of supplementary data spike
manicminer Oct 1, 2024
4921b5c
importer-rest-api-specs: do not set the description, see https://gith…
manicminer Oct 1, 2024
a5c820f
importer-rest-api-specs: hack for conflicting constant names in the s…
manicminer Oct 1, 2024
1da6920
importer-rest-api-specs: disable check for non-default Resource Provi…
manicminer Oct 1, 2024
975945b
upper case URL in the go sdk
stephybun Oct 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 10 additions & 6 deletions scripts/automation-generate-go-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@
set -e

DIR="$(cd "$(dirname "$0")" && pwd)/.."

sdkToGenerate="${1}"
if [[ "${sdkToGenerate}" == "" ]]; then
echo "must specify SDK to generate!" >&2

usage() {
echo "Usage: automation-generate-go-sdk.sh sdkToGenerate" >&2
echo "" >&2
echo "supported values are:" >&2
echo "sdkToGenerate is required and should be one of:" >&2
echo " microsoft-graph" >&2
echo " resource-manager" >&2
echo "" >&2
echo "example usage:" >&2
echo "${0} resource-manager" >&2
}

if [[ "${sdkToGenerate}" == "" ]]; then
echo "sdkToGenerate not specified" >&2
echo "" >&2
usage
exit 1
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package helpers

import "github.com/hashicorp/pandora/tools/data-api-sdk/v1/models"

// InnerMostSDKOperationOptionObjectDefinition returns the inner most SDKOperationOptionObjectDefinition.
//
// In the event of an SDKOperationOptionObjectDefinition with no NestedItem, the current item will be returned.
// In the event of a NestedItem being present, or a NestedItem having a NestedItem, this method
// will recurse until it finds the SDKOperationOptionObjectDefinition without a NestedItem.
//
// This is useful for obtaining the inner type for assignment purposes.
func InnerMostSDKOperationOptionObjectDefinition(input models.SDKOperationOptionObjectDefinition) models.SDKOperationOptionObjectDefinition {
if input.NestedItem != nil {
return InnerMostSDKOperationOptionObjectDefinition(*input.NestedItem)
}

return input
}
6 changes: 0 additions & 6 deletions tools/data-api-sdk/v1/helpers/todo.go

This file was deleted.

3 changes: 3 additions & 0 deletions tools/importer-rest-api-specs/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import: build
import-with-api: build
./importer-rest-api-specs import --data-api=http://localhost:8080

validate: build
./importer-rest-api-specs validate

test: build
go test -v ./... -timeout=60m

Expand Down
148 changes: 0 additions & 148 deletions tools/importer-rest-api-specs/components/discovery/data.go

This file was deleted.

181 changes: 0 additions & 181 deletions tools/importer-rest-api-specs/components/discovery/discovery.go

This file was deleted.

Loading
Loading