Skip to content

Commit

Permalink
[DGS-6167] AsyncAPI Reverse Tooling Metric added (#34)
Browse files Browse the repository at this point in the history
* AsyncAPI Reverse Tooling Metric added

* changed description
  • Loading branch information
pagrawal10 authored Mar 21, 2023
1 parent 16aeb48 commit b0d877c
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**AsyncapiParsePut**](docs/DefaultApi.md#asyncapiparseput) | **Put** /asyncapi/parse |
*DefaultApi* | [**AsyncapiPut**](docs/DefaultApi.md#asyncapiput) | **Put** /asyncapi |
*DefaultApi* | [**CreateBusinessMetadata**](docs/DefaultApi.md#createbusinessmetadata) | **Post** /catalog/v1/entity/businessmetadata | Bulk API to create multiple business metadata.
*DefaultApi* | [**CreateBusinessMetadataDefs**](docs/DefaultApi.md#createbusinessmetadatadefs) | **Post** /catalog/v1/types/businessmetadatadefs | Bulk create API for business metadata definitions.
Expand Down
13 changes: 13 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3036,6 +3036,19 @@ paths:
"500":
description: Internal Server Error
summary: Get the tag definition with the given name.
/asyncapi/parse:
put:
description: Get number of times the cli tool is used to import and parse the
spec file
responses:
"204":
description: No Content
"400":
description: Bad Request
"429":
description: Rate Limit Error
"500":
description: Internal Server Error
/asyncapi:
put:
description: Get number of times the cli tool is used to export/produce the
Expand Down
75 changes: 75 additions & 0 deletions api_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ var (

type DefaultApi interface {

/*
* AsyncapiParsePut Method for AsyncapiParsePut
*
* Get number of times the cli tool is used to import and parse the spec file
*
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
*/
AsyncapiParsePut(ctx _context.Context) (*_nethttp.Response, error)

/*
* AsyncapiPut Method for AsyncapiPut
*
Expand Down Expand Up @@ -765,6 +774,72 @@ type DefaultApi interface {
// DefaultApiService DefaultApi service
type DefaultApiService service

/*
* AsyncapiParsePut Method for AsyncapiParsePut
*
* Get number of times the cli tool is used to import and parse the spec file
*
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
*/
func (a *DefaultApiService) AsyncapiParsePut(ctx _context.Context) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
)

// create path and map variables
localVarPath := a.client.cfg.BasePath + "/asyncapi/parse"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}

// to determine the Content-Type header
localVarHTTPContentTypes := []string{}

// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}

// to determine the Accept header
localVarHTTPHeaderAccepts := []string{}

// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}

localVarHTTPResponse, err := a.client.callAPI(r)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}

localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
if err != nil {
return localVarHTTPResponse, err
}

if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarHTTPResponse, newErr
}

return localVarHTTPResponse, nil
}

/*
* AsyncapiPut Method for AsyncapiPut
*
Expand Down
31 changes: 31 additions & 0 deletions docs/DefaultApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All URIs are relative to *http://localhost*

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



## AsyncapiParsePut

> AsyncapiParsePut(ctx, )


Get number of times the cli tool is used to import and parse the spec file

### Required Parameters

This endpoint does not need any parameter.

### Return type

(empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)


## AsyncapiPut

> AsyncapiPut(ctx, )
Expand Down
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module github.com/confluentinc/schema-registry-sdk-go

go 1.17

require (
github.com/antihax/optional v1.0.0
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
Expand Down
47 changes: 47 additions & 0 deletions mock/api_default.go

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

0 comments on commit b0d877c

Please sign in to comment.