Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion scripts/download-oas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ for service_dir in ${work_dir}/${OAS_REPO_NAME}/services/*; do
# To support initial integrations of the IaaS API in an Alpha state, we will temporarily use it to generate an IaaS Alpha SDK module
# This check can be removed once the IaaS API moves all endpoints to Beta
if [[ ${service} == "iaas" ]]; then
echo "found alpha iaas"
mv -f ${dir}/*.json ${ROOT_DIR}/oas/iaasalpha.json
fi
if [[ ${ALLOW_ALPHA} != "true" ]]; then
Expand Down
6 changes: 5 additions & 1 deletion templates/go/model_simple.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ type {{classname}} struct {
// Can be cast to float32 without loss of precision.
{{/isFloat}}
{{#required}}
{{^isReadOnly}}
{{^isWriteOnly}}
// REQUIRED
{{/isWriteOnly}}
{{/isReadOnly}}
{{/required}}
{{name}} *{{#isNumber}}float64{{/isNumber}}{{#isFloat}}float64{{/isFloat}}{{#isDouble}}float64{{/isDouble}}{{#isInteger}}int64{{/isInteger}}{{#isLong}}int64{{/isLong}}{{^isNumeric}}{{{dataType}}}{{/isNumeric}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}`
{{name}} *{{#isNumber}}float64{{/isNumber}}{{#isFloat}}float64{{/isFloat}}{{#isDouble}}float64{{/isDouble}}{{#isInteger}}int64{{/isInteger}}{{#isLong}}int64{{/isLong}}{{^isNumeric}}{{{dataType}}}{{/isNumeric}} `json:"{{baseName}}{{#required}}{{#isReadOnly}},omitempty{{/isReadOnly}}{{/required}}{{#required}}{{#isWriteOnly}},omitempty{{/isWriteOnly}}{{/required}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}`
{{#isAdditionalPropertiesTrue}}
AdditionalProperties map[string]interface{}
{{/isAdditionalPropertiesTrue}}
Expand Down