[API] [SEMVER] replace number with version
(cherry picked from commit fba48e6497
)
This commit is contained in:
parent
9de9a916a6
commit
532ec5d878
|
@ -35,6 +35,6 @@ components:
|
||||||
Version:
|
Version:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
number:
|
version:
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
|
|
||||||
// Version defines model for Version.
|
// Version defines model for Version.
|
||||||
type Version struct {
|
type Version struct {
|
||||||
Number *string `json:"number,omitempty"`
|
Version *string `json:"version,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ServerInterface represents all server handlers.
|
// ServerInterface represents all server handlers.
|
||||||
|
|
|
@ -21,5 +21,5 @@ func TestAPIForgejoVersion(t *testing.T) {
|
||||||
|
|
||||||
var version v1.Version
|
var version v1.Version
|
||||||
DecodeJSON(t, resp, &version)
|
DecodeJSON(t, resp, &version)
|
||||||
assert.Equal(t, "development", *version.Number)
|
assert.Equal(t, "development", *version.Version)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue