Skip to content

Commit b0d877c

Browse files
authored
[DGS-6167] AsyncAPI Reverse Tooling Metric added (#34)
* AsyncAPI Reverse Tooling Metric added * changed description
1 parent 16aeb48 commit b0d877c

File tree

6 files changed

+167
-2
lines changed

6 files changed

+167
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ All URIs are relative to *http://localhost*
3232

3333
Class | Method | HTTP request | Description
3434
------------ | ------------- | ------------- | -------------
35+
*DefaultApi* | [**AsyncapiParsePut**](docs/DefaultApi.md#asyncapiparseput) | **Put** /asyncapi/parse |
3536
*DefaultApi* | [**AsyncapiPut**](docs/DefaultApi.md#asyncapiput) | **Put** /asyncapi |
3637
*DefaultApi* | [**CreateBusinessMetadata**](docs/DefaultApi.md#createbusinessmetadata) | **Post** /catalog/v1/entity/businessmetadata | Bulk API to create multiple business metadata.
3738
*DefaultApi* | [**CreateBusinessMetadataDefs**](docs/DefaultApi.md#createbusinessmetadatadefs) | **Post** /catalog/v1/types/businessmetadatadefs | Bulk create API for business metadata definitions.

api/openapi.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3036,6 +3036,19 @@ paths:
30363036
"500":
30373037
description: Internal Server Error
30383038
summary: Get the tag definition with the given name.
3039+
/asyncapi/parse:
3040+
put:
3041+
description: Get number of times the cli tool is used to import and parse the
3042+
spec file
3043+
responses:
3044+
"204":
3045+
description: No Content
3046+
"400":
3047+
description: Bad Request
3048+
"429":
3049+
description: Rate Limit Error
3050+
"500":
3051+
description: Internal Server Error
30393052
/asyncapi:
30403053
put:
30413054
description: Get number of times the cli tool is used to export/produce the

api_default.go

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ var (
2727

2828
type DefaultApi interface {
2929

30+
/*
31+
* AsyncapiParsePut Method for AsyncapiParsePut
32+
*
33+
* Get number of times the cli tool is used to import and parse the spec file
34+
*
35+
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
36+
*/
37+
AsyncapiParsePut(ctx _context.Context) (*_nethttp.Response, error)
38+
3039
/*
3140
* AsyncapiPut Method for AsyncapiPut
3241
*
@@ -765,6 +774,72 @@ type DefaultApi interface {
765774
// DefaultApiService DefaultApi service
766775
type DefaultApiService service
767776

777+
/*
778+
* AsyncapiParsePut Method for AsyncapiParsePut
779+
*
780+
* Get number of times the cli tool is used to import and parse the spec file
781+
*
782+
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
783+
*/
784+
func (a *DefaultApiService) AsyncapiParsePut(ctx _context.Context) (*_nethttp.Response, error) {
785+
var (
786+
localVarHTTPMethod = _nethttp.MethodPut
787+
localVarPostBody interface{}
788+
localVarFormFileName string
789+
localVarFileName string
790+
localVarFileBytes []byte
791+
)
792+
793+
// create path and map variables
794+
localVarPath := a.client.cfg.BasePath + "/asyncapi/parse"
795+
localVarHeaderParams := make(map[string]string)
796+
localVarQueryParams := _neturl.Values{}
797+
localVarFormParams := _neturl.Values{}
798+
799+
// to determine the Content-Type header
800+
localVarHTTPContentTypes := []string{}
801+
802+
// set Content-Type header
803+
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
804+
if localVarHTTPContentType != "" {
805+
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
806+
}
807+
808+
// to determine the Accept header
809+
localVarHTTPHeaderAccepts := []string{}
810+
811+
// set Accept header
812+
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
813+
if localVarHTTPHeaderAccept != "" {
814+
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
815+
}
816+
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
817+
if err != nil {
818+
return nil, err
819+
}
820+
821+
localVarHTTPResponse, err := a.client.callAPI(r)
822+
if err != nil || localVarHTTPResponse == nil {
823+
return localVarHTTPResponse, err
824+
}
825+
826+
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
827+
localVarHTTPResponse.Body.Close()
828+
if err != nil {
829+
return localVarHTTPResponse, err
830+
}
831+
832+
if localVarHTTPResponse.StatusCode >= 300 {
833+
newErr := GenericOpenAPIError{
834+
body: localVarBody,
835+
error: localVarHTTPResponse.Status,
836+
}
837+
return localVarHTTPResponse, newErr
838+
}
839+
840+
return localVarHTTPResponse, nil
841+
}
842+
768843
/*
769844
* AsyncapiPut Method for AsyncapiPut
770845
*

docs/DefaultApi.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ All URIs are relative to *http://localhost*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7+
[**AsyncapiParsePut**](DefaultApi.md#AsyncapiParsePut) | **Put** /asyncapi/parse |
78
[**AsyncapiPut**](DefaultApi.md#AsyncapiPut) | **Put** /asyncapi |
89
[**CreateBusinessMetadata**](DefaultApi.md#CreateBusinessMetadata) | **Post** /catalog/v1/entity/businessmetadata | Bulk API to create multiple business metadata.
910
[**CreateBusinessMetadataDefs**](DefaultApi.md#CreateBusinessMetadataDefs) | **Post** /catalog/v1/types/businessmetadatadefs | Bulk create API for business metadata definitions.
@@ -73,6 +74,36 @@ Method | HTTP request | Description
7374

7475

7576

77+
## AsyncapiParsePut
78+
79+
> AsyncapiParsePut(ctx, )
80+
81+
82+
83+
Get number of times the cli tool is used to import and parse the spec file
84+
85+
### Required Parameters
86+
87+
This endpoint does not need any parameter.
88+
89+
### Return type
90+
91+
(empty response body)
92+
93+
### Authorization
94+
95+
No authorization required
96+
97+
### HTTP request headers
98+
99+
- **Content-Type**: Not defined
100+
- **Accept**: Not defined
101+
102+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
103+
[[Back to Model list]](../README.md#documentation-for-models)
104+
[[Back to README]](../README.md)
105+
106+
76107
## AsyncapiPut
77108

78109
> AsyncapiPut(ctx, )

go.mod

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
module github.com/confluentinc/schema-registry-sdk-go
22

3-
go 1.17
4-
53
require (
64
github.com/antihax/optional v1.0.0
75
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45

mock/api_default.go

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)