Skip to content

Commit

Permalink
remove unsupported signature security scheme from generation of samples
Browse files Browse the repository at this point in the history
the signature scheme was added by OpenAPITools#6058 for jersey2-experimental (now jersey2-java8) only but this change affected all samples; and it was not removed when there is another special yaml file with http-signature-test (OpenAPITools#4993) was introduced
  • Loading branch information
tiffmaelite committed Apr 14, 2023
1 parent bebc68b commit 7394dd5
Show file tree
Hide file tree
Showing 119 changed files with 99 additions and 6,231 deletions.
2 changes: 1 addition & 1 deletion bin/configs/java-okhttp-gson.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
generatorName: java
outputDir: samples/client/petstore/java/okhttp-gson
library: okhttp-gson
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature-okhttp-gson.yaml
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-okhttp-gson.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
artifactId: petstore-okhttp-gson
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ paths:
'405':
description: Invalid input
security:
- http_signature_test: []
- petstore_auth:
- 'write:pets'
- 'read:pets'
Expand All @@ -63,7 +62,6 @@ paths:
'405':
description: Validation exception
security:
- http_signature_test: []
- petstore_auth:
- 'write:pets'
- 'read:pets'
Expand Down Expand Up @@ -110,7 +108,6 @@ paths:
'400':
description: Invalid status value
security:
- http_signature_test: []
- petstore_auth:
- 'write:pets'
- 'read:pets'
Expand Down Expand Up @@ -151,7 +148,6 @@ paths:
'400':
description: Invalid tag value
security:
- http_signature_test: []
- petstore_auth:
- 'write:pets'
- 'read:pets'
Expand Down Expand Up @@ -1197,12 +1193,6 @@ components:
type: http
scheme: bearer
bearerFormat: JWT
http_signature_test:
# Test the 'HTTP signature' security scheme.
# Each HTTP request is cryptographically signed as specified
# in https://datatracker.ietf.org/doc/draft-cavage-http-signatures/
type: http
scheme: signature
schemas:
Foo:
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1169,32 +1169,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HealthCheckResult'
/fake/http-signature-test:
get:
tags:
- fake
summary: test http signature authentication
operationId: fake-http-signature-test
parameters:
- name: query_1
in: query
description: query parameter
required: optional
schema:
type: string
- name: header_1
in: header
description: header parameter
required: optional
schema:
type: string
security:
- http_signature_test: []
requestBody:
$ref: '#/components/requestBodies/Pet'
responses:
200:
description: The instance started successfully
servers:
- url: 'http://{server}.swagger.io:{port}/v2'
description: petstore server
Expand Down Expand Up @@ -1272,9 +1246,6 @@ components:
type: http
scheme: bearer
bearerFormat: JWT
http_signature_test:
type: http
scheme: signature
schemas:
Foo:
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1185,32 +1185,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HealthCheckResult'
/fake/http-signature-test:
get:
tags:
- fake
summary: test http signature authentication
operationId: fake-http-signature-test
parameters:
- name: query_1
in: query
description: query parameter
required: optional
schema:
type: string
- name: header_1
in: header
description: header parameter
required: optional
schema:
type: string
security:
- http_signature_test: []
requestBody:
$ref: '#/components/requestBodies/Pet'
responses:
200:
description: The instance started successfully
servers:
- url: 'http://{server}.swagger.io:{port}/v2'
description: petstore server
Expand Down Expand Up @@ -1288,9 +1262,6 @@ components:
type: http
scheme: bearer
bearerFormat: JWT
http_signature_test:
type: http
scheme: signature
schemas:
Foo:
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ paths:
'405':
description: Invalid input
security:
- http_signature_test: []
- petstore_auth:
- 'write:pets'
- 'read:pets'
Expand All @@ -65,7 +64,6 @@ paths:
'405':
description: Validation exception
security:
- http_signature_test: []
- petstore_auth:
- 'write:pets'
- 'read:pets'
Expand Down Expand Up @@ -113,7 +111,6 @@ paths:
'400':
description: Invalid status value
security:
- http_signature_test: []
- petstore_auth:
- 'write:pets'
- 'read:pets'
Expand Down Expand Up @@ -158,7 +155,6 @@ paths:
'400':
description: Invalid tag value
security:
- http_signature_test: []
- petstore_auth:
- 'write:pets'
- 'read:pets'
Expand Down Expand Up @@ -349,7 +345,7 @@ paths:
summary: Find purchase order by ID
description: >-
For valid response try integer IDs with value <= 5 or > 10. Other values
will generated exceptions
will generate exceptions
operationId: getOrderById
parameters:
- name: order_id
Expand Down Expand Up @@ -856,7 +852,7 @@ paths:
format: int64
responses:
'400':
description: Someting wrong
description: Something wrong
/fake/outer/number:
post:
tags:
Expand Down Expand Up @@ -1208,46 +1204,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HealthCheckResult'
/fake/http-signature-test:
get:
tags:
- fake
summary: test http signature authentication
operationId: fake-http-signature-test
parameters:
- name: query_1
in: query
description: query parameter
required: optional
schema:
type: string
- name: header_1
in: header
description: header parameter
required: optional
schema:
type: string
security:
- http_signature_test: []
requestBody:
$ref: '#/components/requestBodies/Pet'
responses:
200:
description: The instance started successfully
/fake/any_type_body:
post:
tags:
- fake
summary: test any type request body
operationId: fakeAnyTypeRequestBody
requestBody:
content:
application/json:
schema:
type: object
responses:
200:
description: OK
servers:
- url: 'http://{server}.swagger.io:{port}/v2'
description: petstore server
Expand Down Expand Up @@ -1325,12 +1281,6 @@ components:
type: http
scheme: bearer
bearerFormat: JWT
http_signature_test:
# Test the 'HTTP signature' security scheme.
# Each HTTP request is cryptographically signed as specified
# in https://datatracker.ietf.org/doc/draft-cavage-http-signatures/
type: http
scheme: signature
schemas:
Foo:
type: object
Expand Down
5 changes: 0 additions & 5 deletions samples/client/petstore/csharp/OpenAPIClient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ Class | Method | HTTP request | Description
*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo |
*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
*FakeApi* | [**FakeHttpSignatureTest**](docs/FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
Expand Down Expand Up @@ -241,7 +240,3 @@ Class | Method | HTTP request | Description

- **Type**: HTTP bearer authentication


### http_signature_test


79 changes: 0 additions & 79 deletions samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**FakeHealthGet**](FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
[**FakeHttpSignatureTest**](FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication
[**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
[**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
[**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
Expand Down Expand Up @@ -94,84 +93,6 @@ No authorization required
[[Back to README]](../README.md)


## FakeHttpSignatureTest

> void FakeHttpSignatureTest (Pet pet, string query1 = null, string header1 = null)
test http signature authentication

### Example

```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
public class FakeHttpSignatureTestExample
{
public static void Main()
{
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";

var apiInstance = new FakeApi(Configuration.Default);
var pet = new Pet(); // Pet | Pet object that needs to be added to the store
var query1 = "query1_example"; // string | query parameter (optional)
var header1 = "header1_example"; // string | header parameter (optional)
try
{
// test http signature authentication
apiInstance.FakeHttpSignatureTest(pet, query1, header1);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.FakeHttpSignatureTest: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```

### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**query1** | **string**| query parameter | [optional]
**header1** | **string**| header parameter | [optional]

### Return type

void (empty response body)

### Authorization

[http_signature_test](../README.md#http_signature_test)

### HTTP request headers

- **Content-Type**: application/json, application/xml
- **Accept**: Not defined


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | The instance started successfully | - |

[[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)


## FakeOuterBooleanSerialize

> bool FakeOuterBooleanSerialize (bool? body = null)
Expand Down
Loading

0 comments on commit 7394dd5

Please sign in to comment.