Repository: goadesign/goa
Pull request #3439 (2024-01-07 17:05:29)

Add API version constant to generated code
This commit introduces the "APIVersion" constant into the generated code. This addition enables the utilization of this value in configuring telemetry data, complementing the existing "ServiceName" constant.

Additionally if a version isn't explicitely set in the design it is now defaulted to "0.0.1".


Patch:
diff --git a/codegen/service/service.go b/codegen/service/service.go
index 1692174d..004616b1 100644
--- a/codegen/service/service.go
+++ b/codegen/service/service.go
@@ -334,6 +334,9 @@ type Auther interface {
 // key.
 const ServiceName = {{ printf "%q" .Name }}
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = {{ printf "%q" .APIVersion }}
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
diff --git a/codegen/service/service_data.go b/codegen/service/service_data.go
index f8db55be..fa718e69 100644
--- a/codegen/service/service_data.go
+++ b/codegen/service/service_data.go
@@ -41,6 +41,8 @@ type (
 		Name string
 		// Description is the service description.
 		Description string
+		// APIVersion is the API version.
+		APIVersion string
 		// StructName is the service struct name.
 		StructName string
 		// VarName is the service variable name (first letter in lowercase).
@@ -747,6 +749,7 @@ func (d ServicesData) analyze(service *expr.ServiceExpr) *Data {
 	data := &Data{
 		Name:               service.Name,
 		Description:        desc,
+		APIVersion:         expr.Root.API.Version,
 		VarName:            varName,
 		PathName:           codegen.SnakeCase(varName),
 		StructName:         codegen.Goify(service.Name, true),
diff --git a/expr/api.go b/expr/api.go
index 32751abb..01ed2026 100644
--- a/expr/api.go
+++ b/expr/api.go
@@ -142,6 +142,9 @@ func (a *APIExpr) Finalize() {
 	if len(a.Servers) == 0 {
 		a.Servers = []*ServerExpr{a.DefaultServer()}
 	}
+	if a.Version == "" {
+		a.Version = "0.0.1"
+	}
 }
 
 // EvalName is the qualified name of the expression.
diff --git a/http/codegen/openapi/v3/builder.go b/http/codegen/openapi/v3/builder.go
index ff032f9e..bba1a1da 100644
--- a/http/codegen/openapi/v3/builder.go
+++ b/http/codegen/openapi/v3/builder.go
@@ -62,10 +62,6 @@ func New(root *expr.RootExpr) *OpenAPI {
 
 // buildInfo builds the OpenAPI Info object.
 func buildInfo(api *expr.APIExpr) *Info {
-	ver := api.Version
-	if ver == "" {
-		ver = "1.0" // cannot be empty as per OpenAPI spec
-	}
 	title := api.Title
 	if title == "" {
 		title = "Goa API" // cannot be empty as per OpenAPI spec
@@ -74,7 +70,7 @@ func buildInfo(api *expr.APIExpr) *Info {
 		Title:          title,
 		Description:    api.Description,
 		TermsOfService: api.TermsOfService,
-		Version:        ver,
+		Version:        api.Version,
 		Extensions:     openapi.ExtensionsFromExpr(api.Meta),
 	}
 	if c := api.Contact; c != nil {


Test patch:
diff --git a/codegen/service/testdata/service_code.go b/codegen/service/testdata/service_code.go
index 27b358cc..c9071467 100644
--- a/codegen/service/testdata/service_code.go
+++ b/codegen/service/testdata/service_code.go
@@ -12,6 +12,9 @@ type Service interface {
 // key.
 const ServiceName = "Service With Spaces"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -73,6 +76,9 @@ type Service interface {
 // key.
 const ServiceName = "SingleMethod"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -111,6 +117,9 @@ type Service interface {
 // key.
 const ServiceName = "MultipleMethods"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -177,6 +186,9 @@ type Service interface {
 // key.
 const ServiceName = "UnionService"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -215,6 +227,9 @@ type Service interface {
 // key.
 const ServiceName = "MultiUnionService"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -251,6 +266,9 @@ type Service interface {
 // key.
 const ServiceName = "WithDefault"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -285,6 +303,9 @@ type Service interface {
 // key.
 const ServiceName = "Empty"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -303,6 +324,9 @@ type Service interface {
 // key.
 const ServiceName = "EmptyResult"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -330,6 +354,9 @@ type Service interface {
 // key.
 const ServiceName = "EmptyPayload"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -357,6 +384,9 @@ type Service interface {
 // key.
 const ServiceName = "ServiceError"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -380,6 +410,9 @@ type Service interface {
 // key.
 const ServiceName = "CustomErrors"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -465,6 +498,9 @@ type Service interface {
 // key.
 const ServiceName = "CustomErrorsCustomFields"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -509,6 +545,9 @@ type Service interface {
 // key.
 const ServiceName = "MultipleMethodsResultMultipleViews"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -654,6 +693,9 @@ type Service interface {
 // key.
 const ServiceName = "WithExplicitAndDefaultViews"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -752,6 +794,9 @@ type Service interface {
 // key.
 const ServiceName = "ResultCollectionMultipleViewsMethod"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -894,6 +939,9 @@ type Service interface {
 // key.
 const ServiceName = "ResultWithOtherResult"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -1044,6 +1092,9 @@ type Service interface {
 // key.
 const ServiceName = "ResultWithResultTypeCollection"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -1291,6 +1342,9 @@ type Service interface {
 // key.
 const ServiceName = "ResultWithDashedMimeType"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -1355,6 +1409,9 @@ type Service interface {
 // key.
 const ServiceName = "ResultWithOneOfType"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -1534,6 +1591,9 @@ type Service interface {
 // key.
 const ServiceName = "ResultWithInlineValidation"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -1600,6 +1660,9 @@ type Service interface {
 // key.
 const ServiceName = "ForceGenerateType"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -1622,6 +1685,9 @@ type Service interface {
 // key.
 const ServiceName = "ForceGenerateTypeExplicit"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -1644,6 +1710,9 @@ type Service interface {
 // key.
 const ServiceName = "StreamingResultService"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -1701,6 +1770,9 @@ type Service interface {
 // key.
 const ServiceName = "StreamingResultWithViewsService"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -1811,6 +1883,9 @@ type Service interface {
 // key.
 const ServiceName = "StreamingResultWithExplicitViewService"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -1919,6 +1994,9 @@ type Service interface {
 // key.
 const ServiceName = "StreamingResultNoPayloadService"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -1963,6 +2041,9 @@ type Service interface {
 // key.
 const ServiceName = "StreamingPayloadService"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2040,6 +2121,9 @@ type Service interface {
 // key.
 const ServiceName = "StreamingPayloadNoPayloadService"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2077,6 +2161,9 @@ type Service interface {
 // key.
 const ServiceName = "StreamingPayloadNoResultService"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2117,6 +2204,9 @@ type Service interface {
 // key.
 const ServiceName = "StreamingPayloadResultWithViewsService"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2243,6 +2333,9 @@ type Service interface {
 // key.
 const ServiceName = "StreamingPayloadResultWithExplicitViewService"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2356,6 +2449,9 @@ type Service interface {
 // key.
 const ServiceName = "BidirectionalStreamingService"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2437,6 +2533,9 @@ type Service interface {
 // key.
 const ServiceName = "BidirectionalStreamingNoPayloadService"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2482,6 +2581,9 @@ type Service interface {
 // key.
 const ServiceName = "BidirectionalStreamingResultWithViewsService"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2613,6 +2715,9 @@ type Service interface {
 // key.
 const ServiceName = "BidirectionalStreamingResultWithExplicitViewService"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2729,6 +2834,9 @@ type Service interface {
 // key.
 const ServiceName = "PkgPathMethod"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2747,6 +2855,9 @@ type Service interface {
 // key.
 const ServiceName = "PkgPathArrayMethod"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2765,6 +2876,9 @@ type Service interface {
 // key.
 const ServiceName = "PkgPathRecursiveMethod"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2787,6 +2901,9 @@ type Service interface {
 // key.
 const ServiceName = "MultiplePkgPathMethod"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2854,6 +2971,9 @@ type Service interface {
 // key.
 const ServiceName = "NoDirMethod"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2879,6 +2999,9 @@ type Service interface {
 // key.
 const ServiceName = "PkgPathDupeMethod"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2905,6 +3028,9 @@ type Service interface {
 // key.
 const ServiceName = "PkgPathDupeMethod2"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
@@ -2923,6 +3049,9 @@ type Service interface {
 // key.
 const ServiceName = "PkgPathPayloadAttributeDSL"
 
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
 // MethodNames lists the service method names as defined in the design. These
 // are the same values that are set in the endpoint request contexts under the
 // MethodKey key.
diff --git a/dsl/_spec/dsl_spec_test.go b/dsl/_spec/dsl_spec_test.go
index 105e4d71..bc5c8494 100644
--- a/dsl/_spec/dsl_spec_test.go
+++ b/dsl/_spec/dsl_spec_test.go
@@ -3,7 +3,6 @@ package dsl_test
 
 import (
 	. "goa.design/goa/v3/dsl"
-	. "goa.design/goa/v3/expr"
 )
 
 // The API expression defines the global API properties of the design. There can
diff --git a/dsl/_spec/type_spec_test.go b/dsl/_spec/type_spec_test.go
index acd517cd..25f0fcb1 100644
--- a/dsl/_spec/type_spec_test.go
+++ b/dsl/_spec/type_spec_test.go
@@ -3,7 +3,6 @@ package dsl_test
 
 import (
 	. "goa.design/goa/v3/dsl"
-	. "goa.design/goa/v3/expr"
 )
 
 // BasicType shows the basic usage for Type.
@@ -74,6 +73,10 @@ var AllTypes = Type("AllTypes", func() {
 	Attribute("any", Any)
 	Attribute("array", ArrayOf(String))
 	Attribute("map", MapOf(String, String))
+	OneOf("union", func() {
+		Attribute("string", String)
+		Attribute("bytes", Bytes)
+	})
 	Attribute("object", func() {
 		Description("Inner type")
 		Attribute("inner_attribute", String)
@@ -81,7 +84,6 @@ var AllTypes = Type("AllTypes", func() {
 	})
 	Attribute("user", AUserType)
 	Attribute("result", AResultType)
-	Attribute("collection", CollectionOf(AResultType))
 })
 
 // AUserType is a type used to define an attribute in AllTypes.
@@ -98,6 +100,7 @@ var AResultType = ResultType("ResultType", func() {
 	Attributes(func() {
 		Attribute("optional", String)
 		Attribute("required", String)
+		Attribute("collection", CollectionOf("AResultType"))
 		Required("required")
 	})
 	View("default", func() {
@@ -208,11 +211,23 @@ var Validations = Type("Validations", func() {
 		MinLength(2)
 		MaxLength(10)
 		Enum([]string{"a", "b"}, []string{"c", "d"})
+		Elem(func() {
+			// Validate elements
+			Pattern("^[a-zA-Z]+$")
+		})
 	})
 
-	Attribute("map", ArrayOf(String), func() {
+	Attribute("map", MapOf(String, String), func() {
 		MinLength(5)
 		MaxLength(10)
+		Key(func() {
+			// Validate keys
+			Pattern("^[a-zA-Z]+$")
+		})
+		Elem(func() {
+			// Validate elements
+			Pattern("^[a-zA-Z]+$")
+		})
 	})
 })
 
diff --git a/http/codegen/openapi/v2/testdata/TestExtensions/endpoint_file0.golden b/http/codegen/openapi/v2/testdata/TestExtensions/endpoint_file0.golden
index a74a77d8..18132c67 100644
--- a/http/codegen/openapi/v2/testdata/TestExtensions/endpoint_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestExtensions/endpoint_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":"","x-test-api":"API"},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"operationId":"testService#testEndpoint","parameters":[{"in":"body","name":"TestEndpointRequestBody","required":true,"schema":{"$ref":"#/definitions/TestServiceTestEndpointRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointResponseBody"}}},"schemes":["https"],"summary":"testEndpoint testService","tags":["testService"],"x-test-operation":"Operation"},"x-test-foo":"bar"}},"definitions":{"TestServiceTestEndpointRequestBody":{"title":"TestServiceTestEndpointRequestBody","type":"object","properties":{"string":{"example":"","type":"string","x-test-schema":"Payload"}},"example":{"string":""}},"TestServiceTestEndpointResponseBody":{"title":"TestServiceTestEndpointResponseBody","type":"object","properties":{"string":{"example":"","type":"string","x-test-schema":"Result"}},"example":{"string":""}}},"tags":[{"description":"Description of Backend","externalDocs":{"description":"See more docs here","url":"http://example.com"},"name":"Backend","x-data":{"foo":"bar"}}]}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1","x-test-api":"API"},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"operationId":"testService#testEndpoint","parameters":[{"in":"body","name":"TestEndpointRequestBody","required":true,"schema":{"$ref":"#/definitions/TestServiceTestEndpointRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointResponseBody"}}},"schemes":["https"],"summary":"testEndpoint testService","tags":["testService"],"x-test-operation":"Operation"},"x-test-foo":"bar"}},"definitions":{"TestServiceTestEndpointRequestBody":{"title":"TestServiceTestEndpointRequestBody","type":"object","properties":{"string":{"example":"","type":"string","x-test-schema":"Payload"}},"example":{"string":""}},"TestServiceTestEndpointResponseBody":{"title":"TestServiceTestEndpointResponseBody","type":"object","properties":{"string":{"example":"","type":"string","x-test-schema":"Result"}},"example":{"string":""}}},"tags":[{"description":"Description of Backend","externalDocs":{"description":"See more docs here","url":"http://example.com"},"name":"Backend","x-data":{"foo":"bar"}}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestExtensions/endpoint_file1.golden b/http/codegen/openapi/v2/testdata/TestExtensions/endpoint_file1.golden
index 39e575fb..d0eb1854 100644
--- a/http/codegen/openapi/v2/testdata/TestExtensions/endpoint_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestExtensions/endpoint_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
     x-test-api: API
 host: goa.design
 consumes:
diff --git a/http/codegen/openapi/v2/testdata/TestSections/empty_file0.golden b/http/codegen/openapi/v2/testdata/TestSections/empty_file0.golden
index b161031e..9c17c6b3 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/empty_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/empty_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestSections/empty_file1.golden b/http/codegen/openapi/v2/testdata/TestSections/empty_file1.golden
index 2bde8fd6..9498246e 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/empty_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/empty_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: goa.design
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v2/testdata/TestSections/explicit-view_file0.golden b/http/codegen/openapi/v2/testdata/TestSections/explicit-view_file0.golden
index b55d269b..3bfcb0ca 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/explicit-view_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/explicit-view_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpointDefault testService","operationId":"testService#testEndpointDefault","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointDefaultResponseBody"}}},"schemes":["http"]}},"/tiny":{"get":{"tags":["testService"],"summary":"testEndpointTiny testService","operationId":"testService#testEndpointTiny","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointTinyResponseBodyTiny"}}},"schemes":["http"]}}},"definitions":{"TestServiceTestEndpointDefaultResponseBody":{"title":"Mediatype identifier: application/json; view=default","type":"object","properties":{"int":{"type":"integer","example":1,"format":"int64"},"string":{"type":"string","example":""}},"description":"TestEndpointDefaultResponseBody result type (default view)","example":{"int":1,"string":""}},"TestServiceTestEndpointTinyResponseBodyTiny":{"title":"Mediatype identifier: application/json; view=tiny","type":"object","properties":{"string":{"type":"string","example":""}},"description":"TestEndpointTinyResponseBody result type (tiny view) (default view)","example":{"string":""}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpointDefault testService","operationId":"testService#testEndpointDefault","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointDefaultResponseBody"}}},"schemes":["http"]}},"/tiny":{"get":{"tags":["testService"],"summary":"testEndpointTiny testService","operationId":"testService#testEndpointTiny","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointTinyResponseBodyTiny"}}},"schemes":["http"]}}},"definitions":{"TestServiceTestEndpointDefaultResponseBody":{"title":"Mediatype identifier: application/json; view=default","type":"object","properties":{"int":{"type":"integer","example":1,"format":"int64"},"string":{"type":"string","example":""}},"description":"TestEndpointDefaultResponseBody result type (default view)","example":{"int":1,"string":""}},"TestServiceTestEndpointTinyResponseBodyTiny":{"title":"Mediatype identifier: application/json; view=tiny","type":"object","properties":{"string":{"type":"string","example":""}},"description":"TestEndpointTinyResponseBody result type (tiny view) (default view)","example":{"string":""}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestSections/explicit-view_file1.golden b/http/codegen/openapi/v2/testdata/TestSections/explicit-view_file1.golden
index 148994c3..05e540bc 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/explicit-view_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/explicit-view_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: localhost:80
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v2/testdata/TestSections/file-service_file0.golden b/http/codegen/openapi/v2/testdata/TestSections/file-service_file0.golden
index d0a15fb8..0a894ade 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/file-service_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/file-service_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/path1":{"get":{"tags":["service-name"],"summary":"Download filename","operationId":"service-name#/path1","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http"]}},"/path2":{"get":{"tags":["user-tag"],"summary":"Download filename","operationId":"service-name#/path2","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http"]}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/path1":{"get":{"tags":["service-name"],"summary":"Download filename","operationId":"service-name#/path1","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http"]}},"/path2":{"get":{"tags":["user-tag"],"summary":"Download filename","operationId":"service-name#/path2","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http"]}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestSections/file-service_file1.golden b/http/codegen/openapi/v2/testdata/TestSections/file-service_file1.golden
index 74c8aae7..014910a1 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/file-service_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/file-service_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: localhost:80
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v2/testdata/TestSections/multiple-services_file0.golden b/http/codegen/openapi/v2/testdata/TestSections/multiple-services_file0.golden
index e3923733..8ad6be14 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/multiple-services_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/multiple-services_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","parameters":[{"name":"TestEndpointRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TestServiceTestEndpointRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointResponseBody"}}},"schemes":["https"]},"post":{"tags":["anotherTestService"],"summary":"testEndpoint anotherTestService","operationId":"anotherTestService#testEndpoint","parameters":[{"name":"TestEndpointRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/AnotherTestServiceTestEndpointRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/AnotherTestServiceTestEndpointResponseBody"}}},"schemes":["https"]}}},"definitions":{"AnotherTestServiceTestEndpointRequestBody":{"title":"AnotherTestServiceTestEndpointRequestBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"AnotherTestServiceTestEndpointResponseBody":{"title":"AnotherTestServiceTestEndpointResponseBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"TestServiceTestEndpointRequestBody":{"title":"TestServiceTestEndpointRequestBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"TestServiceTestEndpointResponseBody":{"title":"TestServiceTestEndpointResponseBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","parameters":[{"name":"TestEndpointRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TestServiceTestEndpointRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointResponseBody"}}},"schemes":["https"]},"post":{"tags":["anotherTestService"],"summary":"testEndpoint anotherTestService","operationId":"anotherTestService#testEndpoint","parameters":[{"name":"TestEndpointRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/AnotherTestServiceTestEndpointRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/AnotherTestServiceTestEndpointResponseBody"}}},"schemes":["https"]}}},"definitions":{"AnotherTestServiceTestEndpointRequestBody":{"title":"AnotherTestServiceTestEndpointRequestBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"AnotherTestServiceTestEndpointResponseBody":{"title":"AnotherTestServiceTestEndpointResponseBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"TestServiceTestEndpointRequestBody":{"title":"TestServiceTestEndpointRequestBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"TestServiceTestEndpointResponseBody":{"title":"TestServiceTestEndpointResponseBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestSections/multiple-services_file1.golden b/http/codegen/openapi/v2/testdata/TestSections/multiple-services_file1.golden
index 21e23beb..73788918 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/multiple-services_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/multiple-services_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: goa.design
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v2/testdata/TestSections/multiple-views_file0.golden b/http/codegen/openapi/v2/testdata/TestSections/multiple-views_file0.golden
index 22380706..7c7f02ea 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/multiple-views_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/multiple-views_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpointDefault testService","operationId":"testService#testEndpointDefault","produces":["application/custom+json"],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointDefaultResponseBody"}}},"schemes":["http"]}},"/tiny":{"get":{"tags":["testService"],"summary":"testEndpointTiny testService","operationId":"testService#testEndpointTiny","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointTinyResponseBodyTiny"}}},"schemes":["http"]}}},"definitions":{"TestServiceTestEndpointDefaultResponseBody":{"title":"Mediatype identifier: application/json; view=default","type":"object","properties":{"int":{"type":"integer","example":1,"format":"int64"},"string":{"type":"string","example":""}},"description":"TestEndpointDefaultResponseBody result type (default view)","example":{"int":1,"string":""}},"TestServiceTestEndpointTinyResponseBodyTiny":{"title":"Mediatype identifier: application/json; view=tiny","type":"object","properties":{"string":{"type":"string","example":""}},"description":"TestEndpointTinyResponseBody result type (tiny view) (default view)","example":{"string":""}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpointDefault testService","operationId":"testService#testEndpointDefault","produces":["application/custom+json"],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointDefaultResponseBody"}}},"schemes":["http"]}},"/tiny":{"get":{"tags":["testService"],"summary":"testEndpointTiny testService","operationId":"testService#testEndpointTiny","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointTinyResponseBodyTiny"}}},"schemes":["http"]}}},"definitions":{"TestServiceTestEndpointDefaultResponseBody":{"title":"Mediatype identifier: application/json; view=default","type":"object","properties":{"int":{"type":"integer","example":1,"format":"int64"},"string":{"type":"string","example":""}},"description":"TestEndpointDefaultResponseBody result type (default view)","example":{"int":1,"string":""}},"TestServiceTestEndpointTinyResponseBodyTiny":{"title":"Mediatype identifier: application/json; view=tiny","type":"object","properties":{"string":{"type":"string","example":""}},"description":"TestEndpointTinyResponseBody result type (tiny view) (default view)","example":{"string":""}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestSections/multiple-views_file1.golden b/http/codegen/openapi/v2/testdata/TestSections/multiple-views_file1.golden
index 77f3e6e1..11c11b7c 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/multiple-views_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/multiple-views_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: localhost:80
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v2/testdata/TestSections/not-generate-attribute_file0.golden b/http/codegen/openapi/v2/testdata/TestSections/not-generate-attribute_file0.golden
index 8b00cc68..5a1ac82f 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/not-generate-attribute_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/not-generate-attribute_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","parameters":[{"name":"TestEndpointRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TestServiceTestEndpointRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointResponseBody"}}},"schemes":["https"]}}},"definitions":{"TestServiceTestEndpointRequestBody":{"title":"TestServiceTestEndpointRequestBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"TestServiceTestEndpointResponseBody":{"title":"TestServiceTestEndpointResponseBody","type":"object","properties":{"int":{"type":"integer","example":0,"format":"int64"}},"example":{"int":0}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","parameters":[{"name":"TestEndpointRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TestServiceTestEndpointRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointResponseBody"}}},"schemes":["https"]}}},"definitions":{"TestServiceTestEndpointRequestBody":{"title":"TestServiceTestEndpointRequestBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"TestServiceTestEndpointResponseBody":{"title":"TestServiceTestEndpointResponseBody","type":"object","properties":{"int":{"type":"integer","example":0,"format":"int64"}},"example":{"int":0}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestSections/not-generate-attribute_file1.golden b/http/codegen/openapi/v2/testdata/TestSections/not-generate-attribute_file1.golden
index 0736ec84..0f1306d1 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/not-generate-attribute_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/not-generate-attribute_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: goa.design
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v2/testdata/TestSections/not-generate-host_file0.golden b/http/codegen/openapi/v2/testdata/TestSections/not-generate-host_file0.golden
index 49331c7d..a01ab6f4 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/not-generate-host_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/not-generate-host_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","responses":{"200":{"description":"OK response.","schema":{"type":"string"}}},"schemes":["https"]}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","responses":{"200":{"description":"OK response.","schema":{"type":"string"}}},"schemes":["https"]}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestSections/not-generate-host_file1.golden b/http/codegen/openapi/v2/testdata/TestSections/not-generate-host_file1.golden
index 91737a72..4009afe0 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/not-generate-host_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/not-generate-host_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 consumes:
     - application/json
     - application/xml
diff --git a/http/codegen/openapi/v2/testdata/TestSections/not-generate-server_file0.golden b/http/codegen/openapi/v2/testdata/TestSections/not-generate-server_file0.golden
index 49331c7d..a01ab6f4 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/not-generate-server_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/not-generate-server_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","responses":{"200":{"description":"OK response.","schema":{"type":"string"}}},"schemes":["https"]}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","responses":{"200":{"description":"OK response.","schema":{"type":"string"}}},"schemes":["https"]}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestSections/not-generate-server_file1.golden b/http/codegen/openapi/v2/testdata/TestSections/not-generate-server_file1.golden
index 91737a72..4009afe0 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/not-generate-server_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/not-generate-server_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 consumes:
     - application/json
     - application/xml
diff --git a/http/codegen/openapi/v2/testdata/TestSections/path-with-wildcards_file0.golden b/http/codegen/openapi/v2/testdata/TestSections/path-with-wildcards_file0.golden
index 03700744..ed394d2f 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/path-with-wildcards_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/path-with-wildcards_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/{int_map}":{"post":{"tags":["test service"],"summary":"test endpoint test service","operationId":"test service#test endpoint","parameters":[{"name":"int_map","in":"path","required":true,"type":"integer"}],"responses":{"204":{"description":"No Content response."}},"schemes":["http"]}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/{int_map}":{"post":{"tags":["test service"],"summary":"test endpoint test service","operationId":"test service#test endpoint","parameters":[{"name":"int_map","in":"path","required":true,"type":"integer"}],"responses":{"204":{"description":"No Content response."}},"schemes":["http"]}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestSections/path-with-wildcards_file1.golden b/http/codegen/openapi/v2/testdata/TestSections/path-with-wildcards_file1.golden
index e053cb83..9d48ad68 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/path-with-wildcards_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/path-with-wildcards_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: localhost:80
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v2/testdata/TestSections/security_file0.golden b/http/codegen/openapi/v2/testdata/TestSections/security_file0.golden
index f8aad98a..8c7d5378 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/security_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/security_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpointA testService","description":"\n**Required security scopes for basic**:\n  * `api:read`\n\n**Required security scopes for jwt**:\n  * `api:read`\n\n**Required security scopes for api_key**:\n  * `api:read`","operationId":"testService#testEndpointA","parameters":[{"name":"k","in":"query","required":true,"type":"string"},{"name":"Token","in":"header","required":true,"type":"string"},{"name":"X-Authorization","in":"header","required":true,"type":"string"},{"name":"Authorization","in":"header","description":"Basic Auth security using Basic scheme (https://tools.ietf.org/html/rfc7617)","required":true,"type":"string"}],"responses":{"204":{"description":"No Content response."}},"schemes":["http"],"security":[{"api_key_query_k":[],"basic_header_Authorization":[],"jwt_header_X-Authorization":[],"oauth2_header_Token":["api:read"]}]},"post":{"tags":["testService"],"summary":"testEndpointB testService","operationId":"testService#testEndpointB","parameters":[{"name":"auth","in":"query","required":true,"type":"string"},{"name":"Authorization","in":"header","required":true,"type":"string"}],"responses":{"204":{"description":"No Content response."}},"schemes":["http"],"security":[{"api_key_header_Authorization":[]},{"oauth2_query_auth":["api:read","api:write"]}]}}},"securityDefinitions":{"api_key_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"Authorization","in":"header"},"api_key_query_k":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"k","in":"query"},"basic_header_Authorization":{"type":"basic","description":"Basic authentication used to authenticate security principal during signin"},"jwt_header_X-Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".\n\n**Security Scopes**:\n  * `api:read`: Read-only access\n  * `api:write`: Read and write access","name":"X-Authorization","in":"header"},"oauth2_header_Token":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flow":"accessCode","authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}},"oauth2_query_auth":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flow":"accessCode","authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpointA testService","description":"\n**Required security scopes for basic**:\n  * `api:read`\n\n**Required security scopes for jwt**:\n  * `api:read`\n\n**Required security scopes for api_key**:\n  * `api:read`","operationId":"testService#testEndpointA","parameters":[{"name":"k","in":"query","required":true,"type":"string"},{"name":"Token","in":"header","required":true,"type":"string"},{"name":"X-Authorization","in":"header","required":true,"type":"string"},{"name":"Authorization","in":"header","description":"Basic Auth security using Basic scheme (https://tools.ietf.org/html/rfc7617)","required":true,"type":"string"}],"responses":{"204":{"description":"No Content response."}},"schemes":["http"],"security":[{"api_key_query_k":[],"basic_header_Authorization":[],"jwt_header_X-Authorization":[],"oauth2_header_Token":["api:read"]}]},"post":{"tags":["testService"],"summary":"testEndpointB testService","operationId":"testService#testEndpointB","parameters":[{"name":"auth","in":"query","required":true,"type":"string"},{"name":"Authorization","in":"header","required":true,"type":"string"}],"responses":{"204":{"description":"No Content response."}},"schemes":["http"],"security":[{"api_key_header_Authorization":[]},{"oauth2_query_auth":["api:read","api:write"]}]}}},"securityDefinitions":{"api_key_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"Authorization","in":"header"},"api_key_query_k":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"k","in":"query"},"basic_header_Authorization":{"type":"basic","description":"Basic authentication used to authenticate security principal during signin"},"jwt_header_X-Authorization":{"type":"apiKey","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".\n\n**Security Scopes**:\n  * `api:read`: Read-only access\n  * `api:write`: Read and write access","name":"X-Authorization","in":"header"},"oauth2_header_Token":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flow":"accessCode","authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}},"oauth2_query_auth":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flow":"accessCode","authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestSections/security_file1.golden b/http/codegen/openapi/v2/testdata/TestSections/security_file1.golden
index fdb440a8..6f9a0093 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/security_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/security_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: localhost:80
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v2/testdata/TestSections/server-host-with-variables_file0.golden b/http/codegen/openapi/v2/testdata/TestSections/server-host-with-variables_file0.golden
index 78caa0c2..8f66ab9d 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/server-host-with-variables_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/server-host-with-variables_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"v1.goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","responses":{"204":{"description":"No Content response."}},"schemes":["https"]}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"v1.goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","responses":{"204":{"description":"No Content response."}},"schemes":["https"]}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestSections/server-host-with-variables_file1.golden b/http/codegen/openapi/v2/testdata/TestSections/server-host-with-variables_file1.golden
index 8ad9e5b9..79748a12 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/server-host-with-variables_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/server-host-with-variables_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: v1.goa.design
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v2/testdata/TestSections/typename_file0.golden b/http/codegen/openapi/v2/testdata/TestSections/typename_file0.golden
index f451f2b8..e2df081e 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/typename_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/typename_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/bar":{"post":{"tags":["testService"],"summary":"bar testService","operationId":"testService#bar","parameters":[{"name":"BarRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/BarPayload"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/BarResult"}}},"schemes":["https"]}},"/baz":{"post":{"tags":["testService"],"summary":"baz testService","operationId":"testService#baz","parameters":[{"name":"BazRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/BazPayload"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/BazResult"}}},"schemes":["https"]}},"/foo":{"post":{"tags":["testService"],"summary":"foo testService","operationId":"testService#foo","parameters":[{"name":"FooRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/FooPayload"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/FooResult"}}},"schemes":["https"]}}},"definitions":{"BarPayload":{"title":"BarPayload","type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"BarResult":{"title":"Mediatype identifier: application/vnd.goa.example.bar; view=default","type":"object","properties":{"value":{"type":"string","example":""}},"description":"BarResponseBody result type (default view)","example":{"value":""}},"BazPayload":{"title":"BazPayload","type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"BazResult":{"title":"BazResult","type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"FooPayload":{"title":"FooPayload","type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"FooResult":{"title":"Mediatype identifier: application/vnd.goa.example.bar; view=default","type":"object","properties":{"value":{"type":"string","example":""}},"description":"FooResponseBody result type (default view)","example":{"value":""}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/bar":{"post":{"tags":["testService"],"summary":"bar testService","operationId":"testService#bar","parameters":[{"name":"BarRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/BarPayload"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/BarResult"}}},"schemes":["https"]}},"/baz":{"post":{"tags":["testService"],"summary":"baz testService","operationId":"testService#baz","parameters":[{"name":"BazRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/BazPayload"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/BazResult"}}},"schemes":["https"]}},"/foo":{"post":{"tags":["testService"],"summary":"foo testService","operationId":"testService#foo","parameters":[{"name":"FooRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/FooPayload"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/FooResult"}}},"schemes":["https"]}}},"definitions":{"BarPayload":{"title":"BarPayload","type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"BarResult":{"title":"Mediatype identifier: application/vnd.goa.example.bar; view=default","type":"object","properties":{"value":{"type":"string","example":""}},"description":"BarResponseBody result type (default view)","example":{"value":""}},"BazPayload":{"title":"BazPayload","type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"BazResult":{"title":"BazResult","type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"FooPayload":{"title":"FooPayload","type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"FooResult":{"title":"Mediatype identifier: application/vnd.goa.example.bar; view=default","type":"object","properties":{"value":{"type":"string","example":""}},"description":"FooResponseBody result type (default view)","example":{"value":""}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestSections/typename_file1.golden b/http/codegen/openapi/v2/testdata/TestSections/typename_file1.golden
index 9df4bd24..0c8cf242 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/typename_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/typename_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: goa.design
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v2/testdata/TestSections/valid_file0.golden b/http/codegen/openapi/v2/testdata/TestSections/valid_file0.golden
index eec81d8d..a6e33862 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/valid_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/valid_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","parameters":[{"name":"TestEndpointRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TestServiceTestEndpointRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointResponseBody"}}},"schemes":["https"]}}},"definitions":{"TestServiceTestEndpointRequestBody":{"title":"TestServiceTestEndpointRequestBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"TestServiceTestEndpointResponseBody":{"title":"TestServiceTestEndpointResponseBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","parameters":[{"name":"TestEndpointRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TestServiceTestEndpointRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointResponseBody"}}},"schemes":["https"]}}},"definitions":{"TestServiceTestEndpointRequestBody":{"title":"TestServiceTestEndpointRequestBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"TestServiceTestEndpointResponseBody":{"title":"TestServiceTestEndpointResponseBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestSections/valid_file1.golden b/http/codegen/openapi/v2/testdata/TestSections/valid_file1.golden
index 30c5c45a..b17bdb82 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/valid_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/valid_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: goa.design
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v2/testdata/TestSections/with-map_file0.golden b/http/codegen/openapi/v2/testdata/TestSections/with-map_file0.golden
index f7975ee2..76e9627d 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/with-map_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/with-map_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"tags":["test service"],"summary":"test endpoint test service","operationId":"test service#test endpoint","parameters":[{"name":"Test EndpointRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TestServiceTestEndpointRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointResponseBody"}}},"schemes":["http"]}}},"definitions":{"FooBarResponseBody":{"title":"Mediatype identifier: application/vnd.goa.foobar; view=default","type":"object","properties":{"bar":{"type":"array","items":{"$ref":"#/definitions/barResponseBody"},"example":[{"string":""},{"string":""}]},"foo":{"type":"string","example":""}},"description":"Foo BarResponseBody result type (default view)","example":{"bar":[{"string":""},{"string":""},{"string":""},{"string":""}],"foo":""}},"TestServiceTestEndpointRequestBody":{"title":"TestServiceTestEndpointRequestBody","type":"object","properties":{"int_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1,"format":"int64"}},"type_map":{"type":"object","example":{"":{"string":""}},"additionalProperties":{"$ref":"#/definitions/barRequestBody"}},"uint_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1,"format":"int64"}}},"example":{"int_map":{"":1},"type_map":{"":{"string":""}},"uint_map":{"":1}}},"TestServiceTestEndpointResponseBody":{"title":"TestServiceTestEndpointResponseBody","type":"object","properties":{"resulttype_map":{"type":"object","example":{"":{"bar":[{"string":""},{"string":""}],"foo":""}},"additionalProperties":{"$ref":"#/definitions/FooBarResponseBody"}},"uint32_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1,"format":"int32"}},"uint64_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1,"format":"int64"}}},"example":{"resulttype_map":{"":{"bar":[{"string":""},{"string":""}],"foo":""}},"uint32_map":{"":1},"uint64_map":{"":1}}},"barRequestBody":{"title":"barRequestBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"barResponseBody":{"title":"barResponseBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"tags":["test service"],"summary":"test endpoint test service","operationId":"test service#test endpoint","parameters":[{"name":"Test EndpointRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TestServiceTestEndpointRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointResponseBody"}}},"schemes":["http"]}}},"definitions":{"FooBarResponseBody":{"title":"Mediatype identifier: application/vnd.goa.foobar; view=default","type":"object","properties":{"bar":{"type":"array","items":{"$ref":"#/definitions/barResponseBody"},"example":[{"string":""},{"string":""}]},"foo":{"type":"string","example":""}},"description":"Foo BarResponseBody result type (default view)","example":{"bar":[{"string":""},{"string":""},{"string":""},{"string":""}],"foo":""}},"TestServiceTestEndpointRequestBody":{"title":"TestServiceTestEndpointRequestBody","type":"object","properties":{"int_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1,"format":"int64"}},"type_map":{"type":"object","example":{"":{"string":""}},"additionalProperties":{"$ref":"#/definitions/barRequestBody"}},"uint_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1,"format":"int64"}}},"example":{"int_map":{"":1},"type_map":{"":{"string":""}},"uint_map":{"":1}}},"TestServiceTestEndpointResponseBody":{"title":"TestServiceTestEndpointResponseBody","type":"object","properties":{"resulttype_map":{"type":"object","example":{"":{"bar":[{"string":""},{"string":""}],"foo":""}},"additionalProperties":{"$ref":"#/definitions/FooBarResponseBody"}},"uint32_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1,"format":"int32"}},"uint64_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1,"format":"int64"}}},"example":{"resulttype_map":{"":{"bar":[{"string":""},{"string":""}],"foo":""}},"uint32_map":{"":1},"uint64_map":{"":1}}},"barRequestBody":{"title":"barRequestBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"barResponseBody":{"title":"barResponseBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestSections/with-map_file1.golden b/http/codegen/openapi/v2/testdata/TestSections/with-map_file1.golden
index 4e1bd114..18313f4e 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/with-map_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/with-map_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: localhost:80
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v2/testdata/TestSections/with-spaces_file0.golden b/http/codegen/openapi/v2/testdata/TestSections/with-spaces_file0.golden
index 63004da2..e33188de 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/with-spaces_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/with-spaces_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"tags":["test service"],"summary":"test endpoint test service","operationId":"test service#test endpoint","parameters":[{"name":"Test EndpointRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TestServiceTestEndpointRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointOKResponseBody"}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointNotFoundResponseBody"}}},"schemes":["http"]}}},"definitions":{"TestServiceTestEndpointNotFoundResponseBody":{"title":"Mediatype identifier: application/vnd.goa.foobar; view=default","type":"object","properties":{"bar":{"type":"array","items":{"$ref":"#/definitions/barResponseBody"},"example":[{"string":""},{"string":""}]},"foo":{"type":"string","example":""}},"description":"Test EndpointNot FoundResponseBody result type (default view)","example":{"bar":[{"string":""},{"string":""},{"string":""},{"string":""}],"foo":""}},"TestServiceTestEndpointOKResponseBody":{"title":"Mediatype identifier: application/vnd.goa.foobar; view=default","type":"object","properties":{"bar":{"type":"array","items":{"$ref":"#/definitions/barResponseBody"},"example":[{"string":""},{"string":""},{"string":""},{"string":""}]},"foo":{"type":"string","example":""}},"description":"Test EndpointOKResponseBody result type (default view)","example":{"bar":[{"string":""},{"string":""}],"foo":""}},"TestServiceTestEndpointRequestBody":{"title":"TestServiceTestEndpointRequestBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"barResponseBody":{"title":"barResponseBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"tags":["test service"],"summary":"test endpoint test service","operationId":"test service#test endpoint","parameters":[{"name":"Test EndpointRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TestServiceTestEndpointRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointOKResponseBody"}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/TestServiceTestEndpointNotFoundResponseBody"}}},"schemes":["http"]}}},"definitions":{"TestServiceTestEndpointNotFoundResponseBody":{"title":"Mediatype identifier: application/vnd.goa.foobar; view=default","type":"object","properties":{"bar":{"type":"array","items":{"$ref":"#/definitions/barResponseBody"},"example":[{"string":""},{"string":""}]},"foo":{"type":"string","example":""}},"description":"Test EndpointNot FoundResponseBody result type (default view)","example":{"bar":[{"string":""},{"string":""},{"string":""},{"string":""}],"foo":""}},"TestServiceTestEndpointOKResponseBody":{"title":"Mediatype identifier: application/vnd.goa.foobar; view=default","type":"object","properties":{"bar":{"type":"array","items":{"$ref":"#/definitions/barResponseBody"},"example":[{"string":""},{"string":""},{"string":""},{"string":""}]},"foo":{"type":"string","example":""}},"description":"Test EndpointOKResponseBody result type (default view)","example":{"bar":[{"string":""},{"string":""}],"foo":""}},"TestServiceTestEndpointRequestBody":{"title":"TestServiceTestEndpointRequestBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"barResponseBody":{"title":"barResponseBody","type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestSections/with-spaces_file1.golden b/http/codegen/openapi/v2/testdata/TestSections/with-spaces_file1.golden
index 678a3ab2..69d90c79 100644
--- a/http/codegen/openapi/v2/testdata/TestSections/with-spaces_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestSections/with-spaces_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: localhost:80
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v2/testdata/TestValidations/array_file0.golden b/http/codegen/openapi/v2/testdata/TestValidations/array_file0.golden
index 1509f706..3f84b254 100644
--- a/http/codegen/openapi/v2/testdata/TestValidations/array_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestValidations/array_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","parameters":[{"name":"array","in":"body","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/foobarRequestBody"}}}],"responses":{"200":{"description":"OK response.","schema":{"type":"string","minLength":0,"maxLength":42}}},"schemes":["https"]}}},"definitions":{"barRequestBody":{"title":"barRequestBody","type":"object","properties":{"string":{"type":"string","example":"","minLength":0,"maxLength":42}},"example":{"string":""}},"foobarRequestBody":{"title":"foobarRequestBody","type":"object","properties":{"bar":{"type":"array","items":{"$ref":"#/definitions/barRequestBody"},"example":[{"string":""},{"string":""}],"minItems":0,"maxItems":42},"foo":{"type":"array","items":{"type":"string","example":"Beatae non id consequatur."},"example":[],"minItems":0,"maxItems":42}},"example":{"bar":[{"string":""},{"string":""}],"foo":["Repudiandae sit.","Asperiores fuga qui rem qui earum eos."]}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","parameters":[{"name":"array","in":"body","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/foobarRequestBody"}}}],"responses":{"200":{"description":"OK response.","schema":{"type":"string","minLength":0,"maxLength":42}}},"schemes":["https"]}}},"definitions":{"barRequestBody":{"title":"barRequestBody","type":"object","properties":{"string":{"type":"string","example":"","minLength":0,"maxLength":42}},"example":{"string":""}},"foobarRequestBody":{"title":"foobarRequestBody","type":"object","properties":{"bar":{"type":"array","items":{"$ref":"#/definitions/barRequestBody"},"example":[{"string":""},{"string":""}],"minItems":0,"maxItems":42},"foo":{"type":"array","items":{"type":"string","example":"Beatae non id consequatur."},"example":[],"minItems":0,"maxItems":42}},"example":{"bar":[{"string":""},{"string":""}],"foo":["Repudiandae sit.","Asperiores fuga qui rem qui earum eos."]}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestValidations/array_file1.golden b/http/codegen/openapi/v2/testdata/TestValidations/array_file1.golden
index 88d78d4d..4ba9abf9 100644
--- a/http/codegen/openapi/v2/testdata/TestValidations/array_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestValidations/array_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: goa.design
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v2/testdata/TestValidations/integer_file0.golden b/http/codegen/openapi/v2/testdata/TestValidations/integer_file0.golden
index 69619177..9a4bca23 100644
--- a/http/codegen/openapi/v2/testdata/TestValidations/integer_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestValidations/integer_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","parameters":[{"name":"int","in":"body","required":true,"schema":{"type":"integer","minimum":0,"maximum":42}}],"responses":{"200":{"description":"OK response.","schema":{"type":"integer","minimum":0,"maximum":42}}},"schemes":["https"]}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","parameters":[{"name":"int","in":"body","required":true,"schema":{"type":"integer","minimum":0,"maximum":42}}],"responses":{"200":{"description":"OK response.","schema":{"type":"integer","minimum":0,"maximum":42}}},"schemes":["https"]}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestValidations/integer_file1.golden b/http/codegen/openapi/v2/testdata/TestValidations/integer_file1.golden
index aff70288..60305b53 100644
--- a/http/codegen/openapi/v2/testdata/TestValidations/integer_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestValidations/integer_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: goa.design
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v2/testdata/TestValidations/string_file0.golden b/http/codegen/openapi/v2/testdata/TestValidations/string_file0.golden
index cfb2e16c..461b895a 100644
--- a/http/codegen/openapi/v2/testdata/TestValidations/string_file0.golden
+++ b/http/codegen/openapi/v2/testdata/TestValidations/string_file0.golden
@@ -1,1 +1,1 @@
-{"swagger":"2.0","info":{"title":"","version":""},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","parameters":[{"name":"string","in":"body","required":true,"schema":{"type":"string","minLength":0,"maxLength":42}}],"responses":{"200":{"description":"OK response.","schema":{"type":"string","minLength":0,"maxLength":42}}},"schemes":["https"]}}}}
\ No newline at end of file
+{"swagger":"2.0","info":{"title":"","version":"0.0.1"},"host":"goa.design","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","parameters":[{"name":"string","in":"body","required":true,"schema":{"type":"string","minLength":0,"maxLength":42}}],"responses":{"200":{"description":"OK response.","schema":{"type":"string","minLength":0,"maxLength":42}}},"schemes":["https"]}}}}
\ No newline at end of file
diff --git a/http/codegen/openapi/v2/testdata/TestValidations/string_file1.golden b/http/codegen/openapi/v2/testdata/TestValidations/string_file1.golden
index 28a18494..f1e35a99 100644
--- a/http/codegen/openapi/v2/testdata/TestValidations/string_file1.golden
+++ b/http/codegen/openapi/v2/testdata/TestValidations/string_file1.golden
@@ -1,7 +1,7 @@
 swagger: "2.0"
 info:
     title: ""
-    version: ""
+    version: 0.0.1
 host: goa.design
 consumes:
     - application/json
diff --git a/http/codegen/openapi/v3/builder_test.go b/http/codegen/openapi/v3/builder_test.go
index f1b04efa..00696d1c 100644
--- a/http/codegen/openapi/v3/builder_test.go
+++ b/http/codegen/openapi/v3/builder_test.go
@@ -81,12 +81,8 @@ func TestBuildInfo(t *testing.T) {
 				t.Errorf("got API terms of service %q, expected %q", info.TermsOfService, c.TermsOfService)
 			}
 
-			expectedVer := c.Version
-			if api.Version == "" {
-				expectedVer = "1.0"
-			}
-			if info.Version != expectedVer {
-				t.Errorf("got API version %q, expected %q", info.Version, expectedVer)
+			if info.Version != c.Version {
+				t.Errorf("got API version %q, expected %q", info.Version, c.Version)
 			}
 		})
 	}
diff --git a/http/codegen/openapi/v3/testdata/golden/array_file0.golden b/http/codegen/openapi/v3/testdata/golden/array_file0.golden
index 23222a81..d8ca2abe 100644
--- a/http/codegen/openapi/v3/testdata/golden/array_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/array_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"https://goa.design"}],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Foobar"},"example":[{"bar":[{"string":""}],"foo":[]},{"bar":[{"string":""}],"foo":[]},{"bar":[{"string":""}],"foo":[]}]},"example":[{"bar":[{"string":""}],"foo":[]},{"bar":[{"string":""}],"foo":[]},{"bar":[{"string":""}],"foo":[]},{"bar":[{"string":""}],"foo":[]}]}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"","minLength":0,"maxLength":42},"example":""}}}}}}},"components":{"schemas":{"Bar":{"type":"object","properties":{"string":{"type":"string","example":"","minLength":0,"maxLength":42}},"example":{"string":""}},"Foobar":{"type":"object","properties":{"bar":{"type":"array","items":{"$ref":"#/components/schemas/Bar"},"example":[{"string":""},{"string":""}],"minItems":0,"maxItems":42},"foo":{"type":"array","items":{"type":"string","example":"Beatae non id consequatur."},"example":[],"minItems":0,"maxItems":42}},"example":{"bar":[{"string":""},{"string":""}],"foo":["Repudiandae sit.","Asperiores fuga qui rem qui earum eos."]}}}},"tags":[{"name":"testService"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"https://goa.design"}],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Foobar"},"example":[{"bar":[{"string":""}],"foo":[]},{"bar":[{"string":""}],"foo":[]},{"bar":[{"string":""}],"foo":[]}]},"example":[{"bar":[{"string":""}],"foo":[]},{"bar":[{"string":""}],"foo":[]},{"bar":[{"string":""}],"foo":[]},{"bar":[{"string":""}],"foo":[]}]}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"","minLength":0,"maxLength":42},"example":""}}}}}}},"components":{"schemas":{"Bar":{"type":"object","properties":{"string":{"type":"string","example":"","minLength":0,"maxLength":42}},"example":{"string":""}},"Foobar":{"type":"object","properties":{"bar":{"type":"array","items":{"$ref":"#/components/schemas/Bar"},"example":[{"string":""},{"string":""}],"minItems":0,"maxItems":42},"foo":{"type":"array","items":{"type":"string","example":"Beatae non id consequatur."},"example":[],"minItems":0,"maxItems":42}},"example":{"bar":[{"string":""},{"string":""}],"foo":["Repudiandae sit.","Asperiores fuga qui rem qui earum eos."]}}}},"tags":[{"name":"testService"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/array_file1.golden b/http/codegen/openapi/v3/testdata/golden/array_file1.golden
index 053a44bc..67d7e32f 100644
--- a/http/codegen/openapi/v3/testdata/golden/array_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/array_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: https://goa.design
 paths:
diff --git a/http/codegen/openapi/v3/testdata/golden/endpoint_file0.golden b/http/codegen/openapi/v3/testdata/golden/endpoint_file0.golden
index 737715cc..1f734b51 100644
--- a/http/codegen/openapi/v3/testdata/golden/endpoint_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/endpoint_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0","x-test-api":"API"},"servers":[{"url":"https://goa.design"}],"paths":{"/":{"post":{"operationId":"testService#testEndpoint","requestBody":{"content":{"application/json":{"example":{"string":""},"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"string":""},"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"}}},"description":"OK response."}},"summary":"testEndpoint testService","tags":["testService"],"x-test-operation":"Operation"},"x-test-foo":"bar"}},"components":{"schemas":{"TestEndpointRequestBody":{"type":"object","properties":{"string":{"example":"","type":"string","x-test-schema":"Payload"}},"example":{"string":""}}}},"tags":[{"description":"Description of Backend","externalDocs":{"description":"See more docs here","url":"http://example.com"},"name":"Backend","x-data":{"foo":"bar"}}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1","x-test-api":"API"},"servers":[{"url":"https://goa.design"}],"paths":{"/":{"post":{"operationId":"testService#testEndpoint","requestBody":{"content":{"application/json":{"example":{"string":""},"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"string":""},"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"}}},"description":"OK response."}},"summary":"testEndpoint testService","tags":["testService"],"x-test-operation":"Operation"},"x-test-foo":"bar"}},"components":{"schemas":{"TestEndpointRequestBody":{"type":"object","properties":{"string":{"example":"","type":"string","x-test-schema":"Payload"}},"example":{"string":""}}}},"tags":[{"description":"Description of Backend","externalDocs":{"description":"See more docs here","url":"http://example.com"},"name":"Backend","x-data":{"foo":"bar"}}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/endpoint_file1.golden b/http/codegen/openapi/v3/testdata/golden/endpoint_file1.golden
index 942a417f..eb1991da 100644
--- a/http/codegen/openapi/v3/testdata/golden/endpoint_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/endpoint_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
     x-test-api: API
 servers:
     - url: https://goa.design
diff --git a/http/codegen/openapi/v3/testdata/golden/error-examples_file0.golden b/http/codegen/openapi/v3/testdata/golden/error-examples_file0.golden
index 8cd58749..b5d0402a 100644
--- a/http/codegen/openapi/v3/testdata/golden/error-examples_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/error-examples_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/":{"get":{"tags":["Errors"],"summary":"Error Errors","operationId":"Errors#Error","responses":{"204":{"description":"No Content response."},"400":{"description":"bad_request: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"foo","message":"request is invalid","name":"bad_request","temporary":false,"timeout":false}}}},"404":{"description":"not_found: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"custom: Conflict response.","content":{"application/vnd.goa.custom-error":{"schema":{"$ref":"#/components/schemas/CustomError"},"example":{"message":"error message","name":"custom"}}}}}}}},"components":{"schemas":{"CustomError":{"type":"object","properties":{"message":{"type":"string","example":"error message"},"name":{"type":"string","example":"custom"}},"example":{"message":"error message","name":"custom"},"required":["name","message"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]}}},"tags":[{"name":"Errors"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/":{"get":{"tags":["Errors"],"summary":"Error Errors","operationId":"Errors#Error","responses":{"204":{"description":"No Content response."},"400":{"description":"bad_request: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"fault":false,"id":"foo","message":"request is invalid","name":"bad_request","temporary":false,"timeout":false}}}},"404":{"description":"not_found: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"custom: Conflict response.","content":{"application/vnd.goa.custom-error":{"schema":{"$ref":"#/components/schemas/CustomError"},"example":{"message":"error message","name":"custom"}}}}}}}},"components":{"schemas":{"CustomError":{"type":"object","properties":{"message":{"type":"string","example":"error message"},"name":{"type":"string","example":"custom"}},"example":{"message":"error message","name":"custom"},"required":["name","message"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]}}},"tags":[{"name":"Errors"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/error-examples_file1.golden b/http/codegen/openapi/v3/testdata/golden/error-examples_file1.golden
index e100f340..51a1cbde 100644
--- a/http/codegen/openapi/v3/testdata/golden/error-examples_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/error-examples_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: http://localhost:80
       description: Default server for test api
diff --git a/http/codegen/openapi/v3/testdata/golden/explicit-view_file0.golden b/http/codegen/openapi/v3/testdata/golden/explicit-view_file0.golden
index 14993b63..afc8b2dc 100644
--- a/http/codegen/openapi/v3/testdata/golden/explicit-view_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/explicit-view_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpointDefault testService","operationId":"testService#testEndpointDefault","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointDefaultResponseBody"},"example":{"int":1,"string":""}}}}}}},"/tiny":{"get":{"tags":["testService"],"summary":"testEndpointTiny testService","operationId":"testService#testEndpointTiny","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointTinyResponseBodyTiny"},"example":{"string":""}}}}}}}},"components":{"schemas":{"TestEndpointDefaultResponseBody":{"type":"object","properties":{"int":{"type":"integer","example":1,"format":"int64"},"string":{"type":"string","example":""}},"description":"TestEndpointDefaultResponseBody result type (default view)","example":{"int":1,"string":""}},"TestEndpointTinyResponseBodyTiny":{"type":"object","properties":{"string":{"type":"string","example":""}},"description":"TestEndpointTinyResponseBody result type (tiny view)","example":{"string":""}}}},"tags":[{"name":"testService"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpointDefault testService","operationId":"testService#testEndpointDefault","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointDefaultResponseBody"},"example":{"int":1,"string":""}}}}}}},"/tiny":{"get":{"tags":["testService"],"summary":"testEndpointTiny testService","operationId":"testService#testEndpointTiny","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointTinyResponseBodyTiny"},"example":{"string":""}}}}}}}},"components":{"schemas":{"TestEndpointDefaultResponseBody":{"type":"object","properties":{"int":{"type":"integer","example":1,"format":"int64"},"string":{"type":"string","example":""}},"description":"TestEndpointDefaultResponseBody result type (default view)","example":{"int":1,"string":""}},"TestEndpointTinyResponseBodyTiny":{"type":"object","properties":{"string":{"type":"string","example":""}},"description":"TestEndpointTinyResponseBody result type (tiny view)","example":{"string":""}}}},"tags":[{"name":"testService"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/explicit-view_file1.golden b/http/codegen/openapi/v3/testdata/golden/explicit-view_file1.golden
index 93dfdbb1..9799aa1f 100644
--- a/http/codegen/openapi/v3/testdata/golden/explicit-view_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/explicit-view_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: http://localhost:80
       description: Default server for test api
diff --git a/http/codegen/openapi/v3/testdata/golden/file-service_file0.golden b/http/codegen/openapi/v3/testdata/golden/file-service_file0.golden
index 9cc250e6..ab0418b6 100644
--- a/http/codegen/openapi/v3/testdata/golden/file-service_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/file-service_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/path1":{"get":{"tags":["service-name"],"summary":"Download filename","operationId":"service-name#/path1","responses":{"200":{"description":"File downloaded"}}}},"/path2":{"get":{"tags":["user-tag"],"summary":"Download filename","operationId":"service-name#/path2","responses":{"200":{"description":"File downloaded"}}}}},"components":{},"tags":[{"name":"service-name"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/path1":{"get":{"tags":["service-name"],"summary":"Download filename","operationId":"service-name#/path1","responses":{"200":{"description":"File downloaded"}}}},"/path2":{"get":{"tags":["user-tag"],"summary":"Download filename","operationId":"service-name#/path2","responses":{"200":{"description":"File downloaded"}}}}},"components":{},"tags":[{"name":"service-name"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/file-service_file1.golden b/http/codegen/openapi/v3/testdata/golden/file-service_file1.golden
index d8569986..65e3df5c 100644
--- a/http/codegen/openapi/v3/testdata/golden/file-service_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/file-service_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: http://localhost:80
       description: Default server for test api
diff --git a/http/codegen/openapi/v3/testdata/golden/integer_file0.golden b/http/codegen/openapi/v3/testdata/golden/integer_file0.golden
index 2ca76bfc..7a518979 100644
--- a/http/codegen/openapi/v3/testdata/golden/integer_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/integer_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"https://goa.design"}],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"integer","example":1,"minimum":0,"maximum":42},"example":1}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"integer","example":1,"minimum":0,"maximum":42},"example":1}}}}}}},"components":{},"tags":[{"name":"testService"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"https://goa.design"}],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"integer","example":1,"minimum":0,"maximum":42},"example":1}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"integer","example":1,"minimum":0,"maximum":42},"example":1}}}}}}},"components":{},"tags":[{"name":"testService"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/integer_file1.golden b/http/codegen/openapi/v3/testdata/golden/integer_file1.golden
index 5bd136e6..e1fa665c 100644
--- a/http/codegen/openapi/v3/testdata/golden/integer_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/integer_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: https://goa.design
 paths:
diff --git a/http/codegen/openapi/v3/testdata/golden/multiple-services_file0.golden b/http/codegen/openapi/v3/testdata/golden/multiple-services_file0.golden
index 85a84053..6cd52e9a 100644
--- a/http/codegen/openapi/v3/testdata/golden/multiple-services_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/multiple-services_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"https://goa.design"}],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}}}},"post":{"tags":["anotherTestService"],"summary":"testEndpoint anotherTestService","operationId":"anotherTestService#testEndpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}}}}}},"components":{"schemas":{"TestEndpointRequestBody":{"type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}},"tags":[{"name":"testService"},{"name":"anotherTestService"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"https://goa.design"}],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}}}},"post":{"tags":["anotherTestService"],"summary":"testEndpoint anotherTestService","operationId":"anotherTestService#testEndpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}}}}}},"components":{"schemas":{"TestEndpointRequestBody":{"type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}},"tags":[{"name":"testService"},{"name":"anotherTestService"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/multiple-services_file1.golden b/http/codegen/openapi/v3/testdata/golden/multiple-services_file1.golden
index ae1e362f..e02b0a85 100644
--- a/http/codegen/openapi/v3/testdata/golden/multiple-services_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/multiple-services_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: https://goa.design
 paths:
diff --git a/http/codegen/openapi/v3/testdata/golden/multiple-views_file0.golden b/http/codegen/openapi/v3/testdata/golden/multiple-views_file0.golden
index cb89573b..a9dc1f71 100644
--- a/http/codegen/openapi/v3/testdata/golden/multiple-views_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/multiple-views_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpointDefault testService","operationId":"testService#testEndpointDefault","responses":{"200":{"description":"OK response.","content":{"application/custom+json":{"schema":{"$ref":"#/components/schemas/Result"},"example":{"int":1,"string":""}}}}}}},"/tiny":{"get":{"tags":["testService"],"summary":"testEndpointTiny testService","operationId":"testService#testEndpointTiny","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointTinyResponseBodyTiny"},"example":{"string":""}}}}}}}},"components":{"schemas":{"Result":{"type":"object","properties":{"int":{"type":"integer","example":1,"format":"int64"},"string":{"type":"string","example":""}},"example":{"int":1,"string":""}},"TestEndpointTinyResponseBodyTiny":{"type":"object","properties":{"string":{"type":"string","example":""}},"description":"TestEndpointTinyResponseBody result type (tiny view)","example":{"string":""}}}},"tags":[{"name":"testService"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpointDefault testService","operationId":"testService#testEndpointDefault","responses":{"200":{"description":"OK response.","content":{"application/custom+json":{"schema":{"$ref":"#/components/schemas/Result"},"example":{"int":1,"string":""}}}}}}},"/tiny":{"get":{"tags":["testService"],"summary":"testEndpointTiny testService","operationId":"testService#testEndpointTiny","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointTinyResponseBodyTiny"},"example":{"string":""}}}}}}}},"components":{"schemas":{"Result":{"type":"object","properties":{"int":{"type":"integer","example":1,"format":"int64"},"string":{"type":"string","example":""}},"example":{"int":1,"string":""}},"TestEndpointTinyResponseBodyTiny":{"type":"object","properties":{"string":{"type":"string","example":""}},"description":"TestEndpointTinyResponseBody result type (tiny view)","example":{"string":""}}}},"tags":[{"name":"testService"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/multiple-views_file1.golden b/http/codegen/openapi/v3/testdata/golden/multiple-views_file1.golden
index ef0d0de8..a657b177 100644
--- a/http/codegen/openapi/v3/testdata/golden/multiple-views_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/multiple-views_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: http://localhost:80
       description: Default server for test api
diff --git a/http/codegen/openapi/v3/testdata/golden/not-generate-attribute_file0.golden b/http/codegen/openapi/v3/testdata/golden/not-generate-attribute_file0.golden
index e2f92241..737b5441 100644
--- a/http/codegen/openapi/v3/testdata/golden/not-generate-attribute_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/not-generate-attribute_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"https://goa.design"}],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"},"example":{"int":0}}}}}}}},"components":{"schemas":{"Result":{"type":"object","properties":{"int":{"type":"integer","example":0,"format":"int64"}},"example":{"int":0}},"TestEndpointRequestBody":{"type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}},"tags":[{"name":"testService"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"https://goa.design"}],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"},"example":{"int":0}}}}}}}},"components":{"schemas":{"Result":{"type":"object","properties":{"int":{"type":"integer","example":0,"format":"int64"}},"example":{"int":0}},"TestEndpointRequestBody":{"type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}},"tags":[{"name":"testService"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/not-generate-attribute_file1.golden b/http/codegen/openapi/v3/testdata/golden/not-generate-attribute_file1.golden
index 8909aa94..cf61fdcf 100644
--- a/http/codegen/openapi/v3/testdata/golden/not-generate-attribute_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/not-generate-attribute_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: https://goa.design
 paths:
diff --git a/http/codegen/openapi/v3/testdata/golden/not-generate-host_file0.golden b/http/codegen/openapi/v3/testdata/golden/not-generate-host_file0.golden
index d6c2a6b5..6df44049 100644
--- a/http/codegen/openapi/v3/testdata/golden/not-generate-host_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/not-generate-host_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Beatae non id consequatur."},"example":"Aut sed ducimus repudiandae sit explicabo asperiores."}}}}}}},"components":{},"tags":[{"name":"testService"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Beatae non id consequatur."},"example":"Aut sed ducimus repudiandae sit explicabo asperiores."}}}}}}},"components":{},"tags":[{"name":"testService"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/not-generate-host_file1.golden b/http/codegen/openapi/v3/testdata/golden/not-generate-host_file1.golden
index 8bc6e693..5f4d2bdd 100644
--- a/http/codegen/openapi/v3/testdata/golden/not-generate-host_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/not-generate-host_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 paths:
     /:
         get:
diff --git a/http/codegen/openapi/v3/testdata/golden/not-generate-server_file0.golden b/http/codegen/openapi/v3/testdata/golden/not-generate-server_file0.golden
index d6c2a6b5..6df44049 100644
--- a/http/codegen/openapi/v3/testdata/golden/not-generate-server_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/not-generate-server_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Beatae non id consequatur."},"example":"Aut sed ducimus repudiandae sit explicabo asperiores."}}}}}}},"components":{},"tags":[{"name":"testService"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Beatae non id consequatur."},"example":"Aut sed ducimus repudiandae sit explicabo asperiores."}}}}}}},"components":{},"tags":[{"name":"testService"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/not-generate-server_file1.golden b/http/codegen/openapi/v3/testdata/golden/not-generate-server_file1.golden
index 8bc6e693..5f4d2bdd 100644
--- a/http/codegen/openapi/v3/testdata/golden/not-generate-server_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/not-generate-server_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 paths:
     /:
         get:
diff --git a/http/codegen/openapi/v3/testdata/golden/path-with-wildcards_file0.golden b/http/codegen/openapi/v3/testdata/golden/path-with-wildcards_file0.golden
index 7a2a2df7..e2e33108 100644
--- a/http/codegen/openapi/v3/testdata/golden/path-with-wildcards_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/path-with-wildcards_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/{int_map}":{"post":{"tags":["test service"],"summary":"test endpoint test service","operationId":"test service#test endpoint","parameters":[{"name":"int_map","in":"path","required":true,"schema":{"type":"integer","example":9176544974339886224,"format":"int64"},"example":1933576090881074823}],"responses":{"204":{"description":"No Content response."}}}}},"components":{},"tags":[{"name":"test service"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/{int_map}":{"post":{"tags":["test service"],"summary":"test endpoint test service","operationId":"test service#test endpoint","parameters":[{"name":"int_map","in":"path","required":true,"schema":{"type":"integer","example":9176544974339886224,"format":"int64"},"example":1933576090881074823}],"responses":{"204":{"description":"No Content response."}}}}},"components":{},"tags":[{"name":"test service"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/path-with-wildcards_file1.golden b/http/codegen/openapi/v3/testdata/golden/path-with-wildcards_file1.golden
index 8341a22b..e0a4a6ed 100644
--- a/http/codegen/openapi/v3/testdata/golden/path-with-wildcards_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/path-with-wildcards_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: http://localhost:80
       description: Default server for test api
diff --git a/http/codegen/openapi/v3/testdata/golden/security_file0.golden b/http/codegen/openapi/v3/testdata/golden/security_file0.golden
index 63871908..267ff020 100644
--- a/http/codegen/openapi/v3/testdata/golden/security_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/security_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpointA testService","operationId":"testService#testEndpointA","parameters":[{"name":"k","in":"query","allowEmptyValue":true,"required":true,"schema":{"type":"string","example":"Quia molestias."},"example":"Doloribus qui quia."},{"name":"Token","in":"header","allowEmptyValue":true,"required":true,"schema":{"type":"string","example":"Et tempora et quae."},"example":"Itaque inventore optio."},{"name":"X-Authorization","in":"header","allowEmptyValue":true,"required":true,"schema":{"type":"string","example":"Ullam aut."},"example":"Iste perspiciatis."}],"responses":{"204":{"description":"No Content response."}},"security":[{"api_key_query_k":[],"basic_header_Authorization":[],"jwt_header_X-Authorization":["api:read"],"oauth2_header_Token":["api:read"]}]},"post":{"tags":["testService"],"summary":"testEndpointB testService","operationId":"testService#testEndpointB","parameters":[{"name":"auth","in":"query","allowEmptyValue":true,"required":true,"schema":{"type":"string","example":"Harum et."},"example":"Neque nisi quibusdam nisi sint sunt."}],"responses":{"204":{"description":"No Content response."}},"security":[{"api_key_header_Authorization":[]},{"oauth2_query_auth":["api:read","api:write"]}]}}},"components":{"securitySchemes":{"api_key_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"Authorization","in":"header"},"api_key_query_k":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"k","in":"query"},"basic_header_Authorization":{"type":"http","description":"Basic authentication used to authenticate security principal during signin","scheme":"basic"},"jwt_header_X-Authorization":{"type":"http","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","scheme":"bearer"},"oauth2_header_Token":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flows":{"authorizationCode":{"authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","refreshUrl":"http://goa.design/refresh","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}}}},"oauth2_query_auth":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flows":{"authorizationCode":{"authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","refreshUrl":"http://goa.design/refresh","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}}}}}},"tags":[{"name":"testService"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpointA testService","operationId":"testService#testEndpointA","parameters":[{"name":"k","in":"query","allowEmptyValue":true,"required":true,"schema":{"type":"string","example":"Quia molestias."},"example":"Doloribus qui quia."},{"name":"Token","in":"header","allowEmptyValue":true,"required":true,"schema":{"type":"string","example":"Et tempora et quae."},"example":"Itaque inventore optio."},{"name":"X-Authorization","in":"header","allowEmptyValue":true,"required":true,"schema":{"type":"string","example":"Ullam aut."},"example":"Iste perspiciatis."}],"responses":{"204":{"description":"No Content response."}},"security":[{"api_key_query_k":[],"basic_header_Authorization":[],"jwt_header_X-Authorization":["api:read"],"oauth2_header_Token":["api:read"]}]},"post":{"tags":["testService"],"summary":"testEndpointB testService","operationId":"testService#testEndpointB","parameters":[{"name":"auth","in":"query","allowEmptyValue":true,"required":true,"schema":{"type":"string","example":"Harum et."},"example":"Neque nisi quibusdam nisi sint sunt."}],"responses":{"204":{"description":"No Content response."}},"security":[{"api_key_header_Authorization":[]},{"oauth2_query_auth":["api:read","api:write"]}]}}},"components":{"securitySchemes":{"api_key_header_Authorization":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"Authorization","in":"header"},"api_key_query_k":{"type":"apiKey","description":"Secures endpoint by requiring an API key.","name":"k","in":"query"},"basic_header_Authorization":{"type":"http","description":"Basic authentication used to authenticate security principal during signin","scheme":"basic"},"jwt_header_X-Authorization":{"type":"http","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","scheme":"bearer"},"oauth2_header_Token":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flows":{"authorizationCode":{"authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","refreshUrl":"http://goa.design/refresh","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}}}},"oauth2_query_auth":{"type":"oauth2","description":"Secures endpoint by requiring a valid OAuth2 token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","flows":{"authorizationCode":{"authorizationUrl":"http://goa.design/authorization","tokenUrl":"http://goa.design/token","refreshUrl":"http://goa.design/refresh","scopes":{"api:read":"Read-only access","api:write":"Read and write access"}}}}}},"tags":[{"name":"testService"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/security_file1.golden b/http/codegen/openapi/v3/testdata/golden/security_file1.golden
index f83c0719..9668b7e1 100644
--- a/http/codegen/openapi/v3/testdata/golden/security_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/security_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: http://localhost:80
       description: Default server for test api
diff --git a/http/codegen/openapi/v3/testdata/golden/server-host-with-variables_file0.golden b/http/codegen/openapi/v3/testdata/golden/server-host-with-variables_file0.golden
index 7184927b..63cc5928 100644
--- a/http/codegen/openapi/v3/testdata/golden/server-host-with-variables_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/server-host-with-variables_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"https://{version}.goa.design","variables":{"version":{"default":"v1"}}}],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","responses":{"204":{"description":"No Content response."}}}}},"components":{},"tags":[{"name":"testService"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"https://{version}.goa.design","variables":{"version":{"default":"v1"}}}],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","responses":{"204":{"description":"No Content response."}}}}},"components":{},"tags":[{"name":"testService"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/server-host-with-variables_file1.golden b/http/codegen/openapi/v3/testdata/golden/server-host-with-variables_file1.golden
index 6947d784..29e3c331 100644
--- a/http/codegen/openapi/v3/testdata/golden/server-host-with-variables_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/server-host-with-variables_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: https://{version}.goa.design
       variables:
diff --git a/http/codegen/openapi/v3/testdata/golden/skip-response-body-encode-decode_file0.golden b/http/codegen/openapi/v3/testdata/golden/skip-response-body-encode-decode_file0.golden
index 92a9abd6..fde240e4 100644
--- a/http/codegen/openapi/v3/testdata/golden/skip-response-body-encode-decode_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/skip-response-body-encode-decode_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/binary":{"get":{"tags":["testService"],"summary":"binary testService","operationId":"testService#binary","responses":{"200":{"description":"OK response.","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}}}}},"/empty":{"get":{"tags":["testService"],"summary":"empty testService","operationId":"testService#empty","responses":{"204":{"description":"No Content response."}}}},"/empty/ok":{"get":{"tags":["testService"],"summary":"empty_ok testService","operationId":"testService#empty_ok","responses":{"200":{"description":"OK response."}}}}},"components":{},"tags":[{"name":"testService"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/binary":{"get":{"tags":["testService"],"summary":"binary testService","operationId":"testService#binary","responses":{"200":{"description":"OK response.","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}}}}},"/empty":{"get":{"tags":["testService"],"summary":"empty testService","operationId":"testService#empty","responses":{"204":{"description":"No Content response."}}}},"/empty/ok":{"get":{"tags":["testService"],"summary":"empty_ok testService","operationId":"testService#empty_ok","responses":{"200":{"description":"OK response."}}}}},"components":{},"tags":[{"name":"testService"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/skip-response-body-encode-decode_file1.golden b/http/codegen/openapi/v3/testdata/golden/skip-response-body-encode-decode_file1.golden
index 8e2f090f..b5f3dfcb 100644
--- a/http/codegen/openapi/v3/testdata/golden/skip-response-body-encode-decode_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/skip-response-body-encode-decode_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: http://localhost:80
       description: Default server for test api
diff --git a/http/codegen/openapi/v3/testdata/golden/string_file0.golden b/http/codegen/openapi/v3/testdata/golden/string_file0.golden
index 78746c8f..0742bc1d 100644
--- a/http/codegen/openapi/v3/testdata/golden/string_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/string_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"https://goa.design"}],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"string","example":"","minLength":0,"maxLength":42},"example":""}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"","minLength":0,"maxLength":42},"example":""}}}}}}},"components":{},"tags":[{"name":"testService"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"https://goa.design"}],"paths":{"/":{"post":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"string","example":"","minLength":0,"maxLength":42},"example":""}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"","minLength":0,"maxLength":42},"example":""}}}}}}},"components":{},"tags":[{"name":"testService"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/string_file1.golden b/http/codegen/openapi/v3/testdata/golden/string_file1.golden
index 06336023..4e6dc726 100644
--- a/http/codegen/openapi/v3/testdata/golden/string_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/string_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: https://goa.design
 paths:
diff --git a/http/codegen/openapi/v3/testdata/golden/typename_file0.golden b/http/codegen/openapi/v3/testdata/golden/typename_file0.golden
index bb6d972a..cf5a10ca 100644
--- a/http/codegen/openapi/v3/testdata/golden/typename_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/typename_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"https://goa.design"}],"paths":{"/bar":{"post":{"tags":["testService"],"summary":"bar testService","operationId":"testService#bar","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarPayload"},"example":{"value":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarResult"},"example":{"value":""}}}}}}},"/baz":{"post":{"tags":["testService"],"summary":"baz testService","operationId":"testService#baz","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BazPayload"},"example":{"value":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BazResult"},"example":{"value":""}}}}}}},"/foo":{"post":{"tags":["testService"],"summary":"foo testService","operationId":"testService#foo","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FooPayload"},"example":{"value":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FooResult"},"example":{"value":""}}}}}}}},"components":{"schemas":{"BarPayload":{"type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"BarResult":{"type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"BazPayload":{"type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"BazResult":{"type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"FooPayload":{"type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"FooResult":{"type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}}}},"tags":[{"name":"testService"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"https://goa.design"}],"paths":{"/bar":{"post":{"tags":["testService"],"summary":"bar testService","operationId":"testService#bar","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarPayload"},"example":{"value":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarResult"},"example":{"value":""}}}}}}},"/baz":{"post":{"tags":["testService"],"summary":"baz testService","operationId":"testService#baz","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BazPayload"},"example":{"value":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BazResult"},"example":{"value":""}}}}}}},"/foo":{"post":{"tags":["testService"],"summary":"foo testService","operationId":"testService#foo","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FooPayload"},"example":{"value":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FooResult"},"example":{"value":""}}}}}}}},"components":{"schemas":{"BarPayload":{"type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"BarResult":{"type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"BazPayload":{"type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"BazResult":{"type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"FooPayload":{"type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}},"FooResult":{"type":"object","properties":{"value":{"type":"string","example":""}},"example":{"value":""}}}},"tags":[{"name":"testService"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/typename_file1.golden b/http/codegen/openapi/v3/testdata/golden/typename_file1.golden
index e3166487..958dd085 100644
--- a/http/codegen/openapi/v3/testdata/golden/typename_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/typename_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: https://goa.design
 paths:
diff --git a/http/codegen/openapi/v3/testdata/golden/valid_file0.golden b/http/codegen/openapi/v3/testdata/golden/valid_file0.golden
index 3042944a..29a7f4f0 100644
--- a/http/codegen/openapi/v3/testdata/golden/valid_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/valid_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"https://goa.design"}],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}}}}}},"components":{"schemas":{"TestEndpointRequestBody":{"type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}},"tags":[{"name":"testService"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"https://goa.design"}],"paths":{"/":{"get":{"tags":["testService"],"summary":"testEndpoint testService","operationId":"testService#testEndpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}}}}}},"components":{"schemas":{"TestEndpointRequestBody":{"type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}},"tags":[{"name":"testService"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/valid_file1.golden b/http/codegen/openapi/v3/testdata/golden/valid_file1.golden
index de3002b9..6ed094f0 100644
--- a/http/codegen/openapi/v3/testdata/golden/valid_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/valid_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: https://goa.design
 paths:
diff --git a/http/codegen/openapi/v3/testdata/golden/with-map_file0.golden b/http/codegen/openapi/v3/testdata/golden/with-map_file0.golden
index 532bd3f8..2eea907d 100644
--- a/http/codegen/openapi/v3/testdata/golden/with-map_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/with-map_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/":{"post":{"tags":["test service"],"summary":"test endpoint test service","operationId":"test service#test endpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"int_map":{"":1},"type_map":{"":{"string":""}},"uint_map":{"":1}}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointResponseBody"},"example":{"resulttype_map":{"":{"bar":[{"string":""},{"string":""},{"string":""},{"string":""}],"foo":""}},"uint32_map":{"":1},"uint64_map":{"":1}}}}}}}}},"components":{"schemas":{"Bar":{"type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"GoaFoobar":{"type":"object","properties":{"bar":{"type":"array","items":{"$ref":"#/components/schemas/Bar"},"example":[{"string":""},{"string":""},{"string":""},{"string":""}]},"foo":{"type":"string","example":""}},"example":{"bar":[{"string":""},{"string":""},{"string":""},{"string":""}],"foo":""}},"TestEndpointRequestBody":{"type":"object","properties":{"int_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1,"format":"int64"}},"type_map":{"type":"object","example":{"":{"string":""}},"additionalProperties":{"$ref":"#/components/schemas/Bar"}},"uint_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1}}},"example":{"int_map":{"":1},"type_map":{"":{"string":""}},"uint_map":{"":1}}},"TestEndpointResponseBody":{"type":"object","properties":{"resulttype_map":{"type":"object","example":{"":{"bar":[{"string":""},{"string":""},{"string":""},{"string":""}],"foo":""}},"additionalProperties":{"$ref":"#/components/schemas/GoaFoobar"}},"uint32_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1}},"uint64_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1}}},"example":{"resulttype_map":{"":{"bar":[{"string":""},{"string":""},{"string":""},{"string":""}],"foo":""}},"uint32_map":{"":1},"uint64_map":{"":1}}}}},"tags":[{"name":"test service"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/":{"post":{"tags":["test service"],"summary":"test endpoint test service","operationId":"test service#test endpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"int_map":{"":1},"type_map":{"":{"string":""}},"uint_map":{"":1}}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointResponseBody"},"example":{"resulttype_map":{"":{"bar":[{"string":""},{"string":""},{"string":""},{"string":""}],"foo":""}},"uint32_map":{"":1},"uint64_map":{"":1}}}}}}}}},"components":{"schemas":{"Bar":{"type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}},"GoaFoobar":{"type":"object","properties":{"bar":{"type":"array","items":{"$ref":"#/components/schemas/Bar"},"example":[{"string":""},{"string":""},{"string":""},{"string":""}]},"foo":{"type":"string","example":""}},"example":{"bar":[{"string":""},{"string":""},{"string":""},{"string":""}],"foo":""}},"TestEndpointRequestBody":{"type":"object","properties":{"int_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1,"format":"int64"}},"type_map":{"type":"object","example":{"":{"string":""}},"additionalProperties":{"$ref":"#/components/schemas/Bar"}},"uint_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1}}},"example":{"int_map":{"":1},"type_map":{"":{"string":""}},"uint_map":{"":1}}},"TestEndpointResponseBody":{"type":"object","properties":{"resulttype_map":{"type":"object","example":{"":{"bar":[{"string":""},{"string":""},{"string":""},{"string":""}],"foo":""}},"additionalProperties":{"$ref":"#/components/schemas/GoaFoobar"}},"uint32_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1}},"uint64_map":{"type":"object","example":{"":1},"additionalProperties":{"type":"integer","example":1}}},"example":{"resulttype_map":{"":{"bar":[{"string":""},{"string":""},{"string":""},{"string":""}],"foo":""}},"uint32_map":{"":1},"uint64_map":{"":1}}}}},"tags":[{"name":"test service"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/with-map_file1.golden b/http/codegen/openapi/v3/testdata/golden/with-map_file1.golden
index 1235695a..9fdc2a81 100644
--- a/http/codegen/openapi/v3/testdata/golden/with-map_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/with-map_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: http://localhost:80
       description: Default server for test api
diff --git a/http/codegen/openapi/v3/testdata/golden/with-spaces_file0.golden b/http/codegen/openapi/v3/testdata/golden/with-spaces_file0.golden
index fcfd2ee4..21bb5ade 100644
--- a/http/codegen/openapi/v3/testdata/golden/with-spaces_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/with-spaces_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/":{"post":{"tags":["test service"],"summary":"test endpoint test service","operationId":"test service#test endpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FooBar"},"example":{"bar":[{"string":""},{"string":""}],"foo":""}}}},"404":{"description":"Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FooBar"},"example":{"bar":[{"string":""},{"string":""},{"string":""},{"string":""}],"foo":""}}}}}}}},"components":{"schemas":{"FooBar":{"type":"object","properties":{"bar":{"type":"array","items":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":[{"string":""},{"string":""},{"string":""},{"string":""}]},"foo":{"type":"string","example":""}},"example":{"bar":[{"string":""},{"string":""}],"foo":""}},"TestEndpointRequestBody":{"type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}},"tags":[{"name":"test service"}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/":{"post":{"tags":["test service"],"summary":"test endpoint test service","operationId":"test service#test endpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":{"string":""}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FooBar"},"example":{"bar":[{"string":""},{"string":""}],"foo":""}}}},"404":{"description":"Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FooBar"},"example":{"bar":[{"string":""},{"string":""},{"string":""},{"string":""}],"foo":""}}}}}}}},"components":{"schemas":{"FooBar":{"type":"object","properties":{"bar":{"type":"array","items":{"$ref":"#/components/schemas/TestEndpointRequestBody"},"example":[{"string":""},{"string":""},{"string":""},{"string":""}]},"foo":{"type":"string","example":""}},"example":{"bar":[{"string":""},{"string":""}],"foo":""}},"TestEndpointRequestBody":{"type":"object","properties":{"string":{"type":"string","example":""}},"example":{"string":""}}}},"tags":[{"name":"test service"}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/with-spaces_file1.golden b/http/codegen/openapi/v3/testdata/golden/with-spaces_file1.golden
index 72e20ece..76c43e25 100644
--- a/http/codegen/openapi/v3/testdata/golden/with-spaces_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/with-spaces_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: http://localhost:80
       description: Default server for test api
diff --git a/http/codegen/openapi/v3/testdata/golden/with-tags_file0.golden b/http/codegen/openapi/v3/testdata/golden/with-tags_file0.golden
index 0eb0efd1..1b0cec01 100644
--- a/http/codegen/openapi/v3/testdata/golden/with-tags_file0.golden
+++ b/http/codegen/openapi/v3/testdata/golden/with-tags_file0.golden
@@ -1,1 +1,1 @@
-{"openapi":"3.0.3","info":{"title":"Goa API","version":"1.0"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/{int_map}":{"post":{"tags":["SomeTag"],"summary":"test endpoint test service","operationId":"test service#test endpoint","parameters":[{"name":"int_map","in":"path","required":true,"schema":{"type":"integer","example":9176544974339886224,"format":"int64"},"example":1933576090881074823}],"responses":{"204":{"description":"No Content response."}}}}},"components":{},"tags":[{"name":"AnotherTag","description":"Endpoint description","externalDocs":{"url":"Endpoint URL"}},{"name":"SomeTag","description":"Endpoint description","externalDocs":{"url":"Endpoint URL"}}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Goa API","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for test api"}],"paths":{"/{int_map}":{"post":{"tags":["SomeTag"],"summary":"test endpoint test service","operationId":"test service#test endpoint","parameters":[{"name":"int_map","in":"path","required":true,"schema":{"type":"integer","example":9176544974339886224,"format":"int64"},"example":1933576090881074823}],"responses":{"204":{"description":"No Content response."}}}}},"components":{},"tags":[{"name":"AnotherTag","description":"Endpoint description","externalDocs":{"url":"Endpoint URL"}},{"name":"SomeTag","description":"Endpoint description","externalDocs":{"url":"Endpoint URL"}}]}
\ No newline at end of file
diff --git a/http/codegen/openapi/v3/testdata/golden/with-tags_file1.golden b/http/codegen/openapi/v3/testdata/golden/with-tags_file1.golden
index b9ccf5b3..942d3239 100644
--- a/http/codegen/openapi/v3/testdata/golden/with-tags_file1.golden
+++ b/http/codegen/openapi/v3/testdata/golden/with-tags_file1.golden
@@ -1,7 +1,7 @@
 openapi: 3.0.3
 info:
     title: Goa API
-    version: "1.0"
+    version: 0.0.1
 servers:
     - url: http://localhost:80
       description: Default server for test api