Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-22 09:54:24 +01:00

[API] [SEMVER] replace number with version

This commit is contained in:
Loïc Dachary 2023-03-18 08:38:14 +01:00
parent 411bc5ac69
commit fba48e6497
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2
3 changed files with 3 additions and 3 deletions

View file

@ -35,6 +35,6 @@ components:
Version: Version:
type: object type: object
properties: properties:
number: version:
type: string type: string

View file

@ -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.

View file

@ -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)
} }