Skip to content

Commit

Permalink
Cleaning up flipflopping generated OpenAPI doc due to goswagger confl…
Browse files Browse the repository at this point in the history
…icts

Signed-off-by: AbstractionFactory <[email protected]>
  • Loading branch information
abstractionfactory committed Sep 4, 2024
1 parent 7b1da90 commit f7f06f0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/go-enry/go-license-detector/v4 v4.3.1
github.com/lib/pq v1.10.9
github.com/mitchellh/go-spdx v0.1.0
github.com/opentofu/libregistry v0.0.0-20240902143137-5bc965332079
github.com/opentofu/libregistry v0.0.0-20240904084317-6fa867eafe63
github.com/opentofu/tofudl v0.0.0-20240730151408-3bd8529dae09
github.com/opentofu/tofutestutils v0.0.0-20240821111804-5fcfb797e0a7
golang.org/x/sync v0.8.0
Expand Down
2 changes: 2 additions & 0 deletions backend/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ github.com/opentofu/libregistry v0.0.0-20240902140652-883944ac1490 h1:GrgjoNMwx1
github.com/opentofu/libregistry v0.0.0-20240902140652-883944ac1490/go.mod h1:irS/XyfQZdwi3Ggm105FfDyj3d9deFAi5GraORIeMsI=
github.com/opentofu/libregistry v0.0.0-20240902143137-5bc965332079 h1:GdkIdGChrfnE4C/HkDsnffddAm3Qd4pms1gO/sf1GJ4=
github.com/opentofu/libregistry v0.0.0-20240902143137-5bc965332079/go.mod h1:irS/XyfQZdwi3Ggm105FfDyj3d9deFAi5GraORIeMsI=
github.com/opentofu/libregistry v0.0.0-20240904084317-6fa867eafe63 h1:mpdO99YRPoMsdjHgc/I7DUrDvgUict9O9KeKfvdlTs0=
github.com/opentofu/libregistry v0.0.0-20240904084317-6fa867eafe63/go.mod h1:irS/XyfQZdwi3Ggm105FfDyj3d9deFAi5GraORIeMsI=
github.com/opentofu/registry-address v0.0.0-20230922120653-901b9ae4061a h1:NyM/PPbc+kxxv2d4OKfE32C5fLtVTLceyg4YKKCYO9Y=
github.com/opentofu/registry-address v0.0.0-20230922120653-901b9ae4061a/go.mod h1:HzQhpVo/NJnGmN+7FPECCVCA5ijU7AUcvf39enBKYOc=
github.com/opentofu/tofudl v0.0.0-20240730151408-3bd8529dae09 h1:bA3Dy3Be9o896wdcQhK0Ky2Eco0ZwCWZgt73dSaYuDI=
Expand Down
2 changes: 1 addition & 1 deletion backend/internal/moduleindex/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (m *Module) Validate() error {
//
// swagger:model
type ModuleAddr struct {
module.Addr
module.Addr `json:"-"`

// Contains the display version of the addr presentable to the end user. This may be
// capitalized.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func Addr(addr provider.Addr) ProviderAddr {
//
// swagger:model
type ProviderAddr struct {
provider.Addr
provider.Addr `json:"-"`

// Display contains the user-readable display variant of this addr. This may be capitalized.
// required: true
Expand Down
25 changes: 13 additions & 12 deletions backend/internal/server/openapi.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
definitions:
Addr:
description: |-
Addr describes a module address combination of NAMESPACE-NAME-TARGETSYSTEM. This will translate to
github.com/NAMESPACE/terraform-TARGETSYSTEM-NAME for now.
type: object
BaseDetails:
properties:
edit_link:
Expand Down Expand Up @@ -360,7 +355,7 @@ definitions:
description: Examples lists all examples for this version.
type: object
id:
$ref: '#/definitions/VersionNumber'
$ref: '#/definitions/ModuleVersionNumber'
incompatible_license:
description: IncompatibleLicense indicates that there are no licenses or there is one or more license that are not approved.
type: boolean
Expand Down Expand Up @@ -423,7 +418,7 @@ definitions:
ModuleVersionDescriptor:
properties:
id:
$ref: '#/definitions/VersionNumber'
$ref: '#/definitions/ModuleVersionNumber'
published:
format: date-time
type: string
Expand All @@ -432,6 +427,12 @@ definitions:
- published
title: ModuleVersionDescriptor describes a single version.
type: object
ModuleVersionNumber:
description: |-
VersionNumber describes the semver version number. Note that in contrast to provider versions module versions
do not have a compulsory "v" prefix. Call ToVCSVersion() before you call Normalize() in order to get the correct
VCS version.
type: string
Output:
properties:
description:
Expand Down Expand Up @@ -570,7 +571,7 @@ definitions:
docs:
$ref: '#/definitions/ProviderDocs'
id:
$ref: '#/definitions/VersionNumber'
$ref: '#/definitions/ProviderVersionNumber'
incompatible_license:
description: IncompatibleLicense indicates that there are no licenses or there is one or more license that are not approved.
type: boolean
Expand All @@ -593,7 +594,7 @@ definitions:
ProviderVersionDescriptor:
properties:
id:
$ref: '#/definitions/VersionNumber'
$ref: '#/definitions/ProviderVersionNumber'
published:
format: date-time
type: string
Expand All @@ -602,6 +603,9 @@ definitions:
- published
title: ProviderVersionDescriptor describes a provider version.
type: object
ProviderVersionNumber:
title: VersionNumber describes the semver version number.
type: string
Resource:
properties:
address:
Expand Down Expand Up @@ -725,9 +729,6 @@ definitions:
- required
title: Variable describes a variable as the UI expects it.
type: object
VersionNumber:
title: VersionNumber describes the semver version number.
type: string
host: api.opentofu.org
info:
description: The API to fetch documentation index and documentation files from the OpenTofu registry.
Expand Down

0 comments on commit f7f06f0

Please sign in to comment.