Skip to content

Commit

Permalink
fix(registry-instance): add accept param for export (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkpattnaik780 authored Nov 2, 2022
1 parent 1c65e71 commit b51ab16
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .openapi/registry-instance.json
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,13 @@
"Admin"
],
"parameters": [
{
"in": "header",
"name": "Accept",
"schema": {
"type": "string"
}
},
{
"name": "forBrowser",
"description": "Indicates if the operation is done for a browser. If true, the response will be a JSON payload with a property called `href`. This `href` will be a single-use, naked download link suitable for use by a web browser to download the content.",
Expand Down
7 changes: 7 additions & 0 deletions registryinstance/apiv1internal/client/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,13 @@ paths:
description: Exports registry data as a ZIP archive.
operationId: exportData
parameters:
- explode: false
in: header
name: Accept
required: false
schema:
type: string
style: simple
- description: Indicates if the operation is done for a browser. If true, the
response will be a JSON payload with a property called `href`. This `href`
will be a single-use, naked download link suitable for use by a web browser
Expand Down
8 changes: 8 additions & 0 deletions registryinstance/apiv1internal/client/api_admin.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions registryinstance/apiv1internal/client/docs/AdminApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ No authorization required

## ExportData

> *os.File ExportData(ctx).ForBrowser(forBrowser).Execute()
> *os.File ExportData(ctx).Accept(accept).ForBrowser(forBrowser).Execute()
Export registry data

Expand All @@ -175,11 +175,12 @@ import (
)

func main() {
accept := "accept_example" // string | (optional)
forBrowser := true // bool | Indicates if the operation is done for a browser. If true, the response will be a JSON payload with a property called `href`. This `href` will be a single-use, naked download link suitable for use by a web browser to download the content. (optional)

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.AdminApi.ExportData(context.Background()).ForBrowser(forBrowser).Execute()
resp, r, err := api_client.AdminApi.ExportData(context.Background()).Accept(accept).ForBrowser(forBrowser).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.ExportData``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
Expand All @@ -200,6 +201,7 @@ Other parameters are passed through a pointer to a apiExportDataRequest struct v

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**accept** | **string** | |
**forBrowser** | **bool** | Indicates if the operation is done for a browser. If true, the response will be a JSON payload with a property called `href`. This `href` will be a single-use, naked download link suitable for use by a web browser to download the content. |

### Return type
Expand Down

0 comments on commit b51ab16

Please sign in to comment.