-
Notifications
You must be signed in to change notification settings - Fork 856
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
[azkeys] convert to typespec #23776
base: main
Are you sure you want to change the base?
[azkeys] convert to typespec #23776
Conversation
2bfcab8
to
d7edc15
Compare
5e16d76
to
02e8542
Compare
regexReplace("constants.go", `.*(\bKeyOperationExport\b).*`, "") | ||
|
||
// delete strconv | ||
regexReplace("client.go", `\"strconv\"`, "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use goimports
, instead of gofmt
, then it'll trim out unused imports for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm we must have a bug in the emitter. We shouldn't be adding unnecessary imports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have had this happen, on occasion, when I remove code (in a transform) that used to call a helper function. Not sure when strconv is used in our generated code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point and that's what's happening here. strconv
is used for setting the maxresults
header and that's being stripped out via a transform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If running goimports
instead of gofmt
obviates this replacement, we should do that instead
02e8542
to
d09d2b5
Compare
d09d2b5
to
02b425c
Compare
} | ||
|
||
func main() { | ||
// delete the version path param check (version == "" is legal for Key Vault but indescribable by OpenAPI) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we've left OpenAPI behind, need something like
// delete the version path param check (version == "" is legal for Key Vault but indescribable by OpenAPI) | |
// delete the version path param check (TypeSpec doesn't allow optional path parameters) |
@@ -28,7 +24,7 @@ type DecryptResponse struct { | |||
|
|||
// DeleteKeyResponse contains the response from method Client.DeleteKey. | |||
type DeleteKeyResponse struct { | |||
// A DeletedKey consisting of a WebKey plus its Attributes and deletion info | |||
// A DeletedKey consisting of a WebKey plus its Attributes and deletion info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this extra space in the source?
@@ -18,15 +14,17 @@ type BackupKeyResult struct { | |||
|
|||
// CreateKeyParameters - The key create parameters. | |||
type CreateKeyParameters struct { | |||
// REQUIRED; The type of key to create. | |||
// REQUIRED; The type of key to create. For valid values, see JsonWebKeyType. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we renamed JsonWebKeyType
to KeyType
. Is this blurb added by the emitter?
Converting keys to generate with typespec
part of #23458