Skip to content

Commit d6a4d67

Browse files
committed
remove signature authentication from samples which do not support it
+ remove http signature from test input yaml when not supported + use http-signature file for python-nextgen and python-legacy instead of standard test input file 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
1 parent 1163b9c commit d6a4d67

File tree

104 files changed

+2010
-3452
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+2010
-3452
lines changed

bin/configs/java-okhttp-gson.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
generatorName: java
22
outputDir: samples/client/petstore/java/okhttp-gson
33
library: okhttp-gson
4-
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature-okhttp-gson.yaml
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-okhttp-gson.yaml
55
templateDir: modules/openapi-generator/src/main/resources/Java
66
additionalProperties:
77
artifactId: petstore-okhttp-gson

bin/configs/python-legacy.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
generatorName: python-legacy
22
outputDir: samples/openapi3/client/petstore/python-legacy
3-
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature-legacy.yaml
44
templateDir: modules/openapi-generator/src/main/resources/python-legacy
55
additionalProperties:
66
packageName: petstore_api

bin/configs/python-nextgen-aiohttp.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
generatorName: python-nextgen
22
outputDir: samples/openapi3/client/petstore/python-nextgen-aiohttp
3-
inputSpec: modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature-nextgen.yaml
44
templateDir: modules/openapi-generator/src/main/resources/python-nextgen
55
library: asyncio
66
additionalProperties:

bin/configs/python-nextgen.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
generatorName: python-nextgen
22
outputDir: samples/openapi3/client/petstore/python-nextgen
3-
inputSpec: modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature-nextgen.yaml
44
templateDir: modules/openapi-generator/src/main/resources/python-nextgen
55
additionalProperties:
66
packageName: petstore_api
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ paths:
4343
'405':
4444
description: Invalid input
4545
security:
46-
- http_signature_test: []
4746
- petstore_auth:
4847
- 'write:pets'
4948
- 'read:pets'
@@ -63,7 +62,6 @@ paths:
6362
'405':
6463
description: Validation exception
6564
security:
66-
- http_signature_test: []
6765
- petstore_auth:
6866
- 'write:pets'
6967
- 'read:pets'
@@ -110,7 +108,6 @@ paths:
110108
'400':
111109
description: Invalid status value
112110
security:
113-
- http_signature_test: []
114111
- petstore_auth:
115112
- 'write:pets'
116113
- 'read:pets'
@@ -151,7 +148,6 @@ paths:
151148
'400':
152149
description: Invalid tag value
153150
security:
154-
- http_signature_test: []
155151
- petstore_auth:
156152
- 'write:pets'
157153
- 'read:pets'
@@ -1197,12 +1193,6 @@ components:
11971193
type: http
11981194
scheme: bearer
11991195
bearerFormat: JWT
1200-
http_signature_test:
1201-
# Test the 'HTTP signature' security scheme.
1202-
# Each HTTP request is cryptographically signed as specified
1203-
# in https://datatracker.ietf.org/doc/draft-cavage-http-signatures/
1204-
type: http
1205-
scheme: signature
12061196
schemas:
12071197
Foo:
12081198
type: object

modules/openapi-generator/src/test/resources/3_0/javascript/petstore-with-fake-endpoints-models-for-testing.yaml

-29
Original file line numberDiff line numberDiff line change
@@ -1169,32 +1169,6 @@ paths:
11691169
application/json:
11701170
schema:
11711171
$ref: '#/components/schemas/HealthCheckResult'
1172-
/fake/http-signature-test:
1173-
get:
1174-
tags:
1175-
- fake
1176-
summary: test http signature authentication
1177-
operationId: fake-http-signature-test
1178-
parameters:
1179-
- name: query_1
1180-
in: query
1181-
description: query parameter
1182-
required: optional
1183-
schema:
1184-
type: string
1185-
- name: header_1
1186-
in: header
1187-
description: header parameter
1188-
required: optional
1189-
schema:
1190-
type: string
1191-
security:
1192-
- http_signature_test: []
1193-
requestBody:
1194-
$ref: '#/components/requestBodies/Pet'
1195-
responses:
1196-
200:
1197-
description: The instance started successfully
11981172
servers:
11991173
- url: 'http://{server}.swagger.io:{port}/v2'
12001174
description: petstore server
@@ -1272,9 +1246,6 @@ components:
12721246
type: http
12731247
scheme: bearer
12741248
bearerFormat: JWT
1275-
http_signature_test:
1276-
type: http
1277-
scheme: signature
12781249
schemas:
12791250
Foo:
12801251
type: object

0 commit comments

Comments
 (0)