Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !6054

Add Http signature authentication test to fake petstore spec

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged William Cheng requested to merge http-signature-test into master 5 years ago
  • Overview 0
  • Commits 2
  • Pipelines 0
  • Changes 25
  • Add Http signature authentication test to fake petstore spec
  • fix plugin version in modules/openapi-generator-maven-plugin/examples/spring.xml

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

FYI @OpenAPITools/generator-core-team

Compare
  • master (base)

and
  • latest version
    23be0137
    2 commits, 2 years ago

25 files
+ 1064
- 2

    Preferences

    File browser
    Compare changes
mod‎ules‎
openapi-generator-m‎aven-plugin/examples‎
sprin‎g.xml‎ +1 -1
openapi-generator/‎src/…/resources/3_0‎
petstore-with-fake-endpoin‎ts-models-for-testing.yaml‎ +29 -0
sam‎ples‎
openapi3/cli‎ent/petstore‎
go/go-p‎etstore‎
a‎pi‎
openap‎i.yaml‎ +32 -0
do‎cs‎
FakeA‎pi.md‎ +45 -0
READ‎ME.md‎ +16 -0
api_f‎ake.go‎ +81 -0
php/OpenAP‎IClient-php‎
docs‎/Api‎
FakeA‎pi.md‎ +58 -0
lib‎/Api‎
FakeA‎pi.php‎ +245 -0
test‎/Api‎
FakeApi‎Test.php‎ +10 -0
READ‎ME.md‎ +6 -0
pyt‎hon‎
do‎cs‎
FakeA‎pi.md‎ +64 -0
petsto‎re_api‎
a‎pi‎
fake_‎api.py‎ +122 -0
configur‎ation.py‎ +58 -0
READ‎ME.md‎ +6 -1
ru‎by‎
do‎cs‎
FakeA‎pi.md‎ +51 -0
lib/pets‎tore/api‎
fake_‎api.rb‎ +66 -0
spec‎/api‎
fake_api‎_spec.rb‎ +13 -0
READ‎ME.md‎ +4 -0
ruby-f‎araday‎
do‎cs‎
FakeA‎pi.md‎ +51 -0
lib/pets‎tore/api‎
fake_‎api.rb‎ +66 -0
spec‎/api‎
fake_api‎_spec.rb‎ +13 -0
READ‎ME.md‎ +4 -0
server/petstore/‎jaxrs-jersey/src‎
gen/java/org/o‎penapitools/api‎
FakeAp‎i.java‎ +15 -0
FakeApiSe‎rvice.java‎ +2 -0
main/java/org/ope‎napitools/api/impl‎
FakeApiServ‎iceImpl.java‎ +6 -0
modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
+ 29
- 0
  • View file @ 23be0137

  • Edit in single-file editor

  • Open in Web IDE


@@ -1093,6 +1093,32 @@ 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
@@ -1168,6 +1194,9 @@ components:
type: http
scheme: bearer
bearerFormat: JWT
http_signature_test:
type: http
scheme: signature
schemas:
Foo:
type: object
modules/openapi-generator-maven-plugin/examples/spring.xml
+ 1
- 1
  • View file @ 23be0137

  • Edit in single-file editor

  • Open in Web IDE


@@ -20,7 +20,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>4.2.2-SNAPSHOT</version>
<version>4.3.1-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>
samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml
+ 32
- 0
  • View file @ 23be0137

  • Edit in single-file editor

  • Open in Web IDE


@@ -1169,6 +1169,35 @@ paths:
summary: Health check endpoint
tags:
- fake
/fake/http-signature-test:
get:
operationId: fake-http-signature-test
parameters:
- description: query parameter
explode: true
in: query
name: query_1
required: false
schema:
type: string
style: form
- description: header parameter
explode: false
in: header
name: header_1
required: false
schema:
type: string
style: simple
requestBody:
$ref: '#/components/requestBodies/Pet'
responses:
"200":
description: The instance started successfully
security: []
summary: test http signature authentication
tags:
- fake
components:
requestBodies:
UserArray:
@@ -2057,3 +2086,6 @@ components:
bearerFormat: JWT
scheme: bearer
type: http
http_signature_test:
scheme: signature
type: http
samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md
+ 45
- 0
  • View file @ 23be0137

  • Edit in single-file editor

  • Open in Web IDE


@@ -5,6 +5,7 @@ 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 |
@@ -49,6 +50,50 @@ No authorization required
[[Back to README]](../README.md)
## FakeHttpSignatureTest
> FakeHttpSignatureTest(ctx, pet, optional)
test http signature authentication
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**optional** | ***FakeHttpSignatureTestOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a FakeHttpSignatureTestOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query1** | **optional.String**| query parameter |
**header1** | **optional.String**| header parameter |
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **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)
## FakeOuterBooleanSerialize
> bool FakeOuterBooleanSerialize(ctx, optional)
samples/openapi3/client/petstore/go/go-petstore/README.md
+ 16
- 0
  • View file @ 23be0137

  • Edit in single-file editor

  • Open in Web IDE


@@ -35,6 +35,7 @@ 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 |
@@ -189,6 +190,21 @@ r, err := client.Service.Operation(auth, args)
```
## http_signature_test
- **Type**: HTTP basic authentication
Example
```golang
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
UserName: "username",
Password: "password",
})
r, err := client.Service.Operation(auth, args)
```
## petstore_auth
0 Assignees
None
Assign to
0 Reviewers
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
Lock merge request
Unlocked
participants
Reference:
Source branch: http-signature-test

Menu

Explore Projects Groups Snippets