Improve Go client tests (#21919)

* test withXml option

* fix path

* update go code (withXml: true)

* test one more go client
This commit is contained in:
William Cheng
2025-09-08 16:45:46 +08:00
committed by GitHub
parent 6e089f5f03
commit bdfbb32cdd
5 changed files with 14 additions and 11 deletions
@@ -19,8 +19,8 @@ var _ MappedNullable = &Category{}
// Category A category for a pet
type Category struct {
Id *int64 `json:"id,omitempty"`
Name *string `json:"name,omitempty" validate:"regexp=^[a-zA-Z0-9]+[a-zA-Z0-9\\\\.\\\\-_]*[a-zA-Z0-9]+$"`
Id *int64 `json:"id,omitempty" xml:"id"`
Name *string `json:"name,omitempty" xml:"name" validate:"regexp=^[a-zA-Z0-9]+[a-zA-Z0-9\\\\.\\\\-_]*[a-zA-Z0-9]+$"`
AdditionalProperties map[string]interface{}
}
@@ -20,14 +20,14 @@ var _ MappedNullable = &Pet{}
// Pet A pet for sale in the pet store
type Pet struct {
Id *int64 `json:"id,omitempty"`
Category *Category `json:"category,omitempty"`
Name string `json:"name"`
PhotoUrls []string `json:"photoUrls"`
Tags []Tag `json:"tags,omitempty"`
Id *int64 `json:"id,omitempty" xml:"id"`
Category *Category `json:"category,omitempty" xml:"category"`
Name string `json:"name" xml:"name"`
PhotoUrls []string `json:"photoUrls" xml:"photoUrls>photoUrl"`
Tags []Tag `json:"tags,omitempty" xml:"tags>tag"`
// pet status in the store
// Deprecated
Status *string `json:"status,omitempty"`
Status *string `json:"status,omitempty" xml:"status"`
AdditionalProperties map[string]interface{}
}
@@ -19,8 +19,8 @@ var _ MappedNullable = &Tag{}
// Tag A tag for a pet
type Tag struct {
Id *int64 `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Id *int64 `json:"id,omitempty" xml:"id"`
Name *string `json:"name,omitempty" xml:"name"`
AdditionalProperties map[string]interface{}
}