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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .spectral.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ extends: spectral:oas
rules:
info-contact: false
operation-tag-defined: false
operation-operationId: false
path-keys-no-trailing-slash: false
oas3-server-trailing-slash: false
4 changes: 2 additions & 2 deletions apis/v1/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
v1 "github.com/sacloud/object-storage-api-go/apis/v1"
)

var serverURL = "https://secure.sakura.ad.jp/cloud/zone/is1a/api/objectstorage/1.0/fed/v1/"
var serverURL = "https://secure.sakura.ad.jp/cloud/zone/is1a/api/objectstorage/1.0"

// Example API定義から生成されたコードを直接利用する例
func Example() {
Expand All @@ -42,7 +42,7 @@ func Example() {
panic(err)
}

sites, err := client.GetClustersWithResponse(context.Background())
sites, err := client.ListClustersWithResponse(context.Background())
if err != nil {
panic(err)
}
Expand Down
7 changes: 6 additions & 1 deletion apis/v1/spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
オリジナルの定義ファイルは以下のサイトで公開されています。
[https://manual.sakura.ad.jp/cloud/objectstorage/api/api-json.html](https://manual.sakura.ad.jp/cloud/objectstorage/api/api-json.html)

公開されている定義ファイルのままではlintでエラーになる箇所があるため、手作業で修正しています
公開されている定義ファイルのままではlintでエラーになる箇所やoapi-codegenで扱いにくい箇所があるため手作業で修正しています
修正は以下のように行っています。

- オリジナルの定義ファイルをダウンロード、`original-swagger.json`として保存
Expand Down Expand Up @@ -49,3 +49,8 @@
- 修正前:`^[\w\d\/]{40}$`
- 修正後:`^[\w\d\/]{1,40}$`
`components.schemas.AccessKeyID`と同じ

### その他の修正点

- [サーバURLを`https://secure.sakura.ad.jp/cloud/zone/is1a/api/objectstorage/1.0`に統一](https://github.com/sacloud/object-storage-api-go/pull/9)
- [各操作に`operationId`を付与](https://github.com/sacloud/object-storage-api-go/pull/9)
Loading