mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-03-10 08:31:23 +00:00
Setting up test infrastructure
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
generatorName: jetbrains-http-client
|
||||
outputDir: samples/client/adyen_checkout/jetbrains/http/client
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/CheckoutService-v70.yaml
|
||||
outputDir: samples/client/jetbrains/adyen/adyen/http/client
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/jetbrains/CheckoutService-v70.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/jetbrains-http-client
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
generatorName: jetbrains-http-client
|
||||
outputDir: samples/client/jetbrains/adyen/checkoutbasic/http/client
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/jetbrains/CheckoutBasic.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/jetbrains-http-client
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
@@ -0,0 +1,109 @@
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Basic
|
||||
version: '1.0'
|
||||
contact:
|
||||
name: Beppe Catanese
|
||||
url: 'https://github.com/gcatanese'
|
||||
description: Sample API
|
||||
license:
|
||||
name: Apache 2.0
|
||||
url: 'https://github.com/gcatanese'
|
||||
servers:
|
||||
- url: 'http://localhost:5001'
|
||||
description: dev server
|
||||
- url: 'http://localhost:5001'
|
||||
description: test server
|
||||
paths:
|
||||
'/users/{userId}':
|
||||
get:
|
||||
summary: Get User
|
||||
description: Get User Info by User ID
|
||||
operationId: get-users-userId
|
||||
tags:
|
||||
- basic
|
||||
parameters:
|
||||
- description: Unique identifier of the user
|
||||
name: userId
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: User Found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
examples:
|
||||
Get User Alice Smith (json):
|
||||
value:
|
||||
id: 142
|
||||
firstName: Alice
|
||||
lastName: Smith
|
||||
email: alice.smith@gmail.com
|
||||
dateOfBirth: '1997-10-31'
|
||||
emailVerified: true
|
||||
signUpDate: '2019-08-24'
|
||||
application/xml:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
examples:
|
||||
Get User Alice Smith (xml):
|
||||
value:
|
||||
id: 143
|
||||
firstName: Alice
|
||||
lastName: Smith
|
||||
email: alice.smith@gmail.com
|
||||
dateOfBirth: '1997-10-31'
|
||||
emailVerified: true
|
||||
signUpDate: '2019-08-24'
|
||||
'404':
|
||||
description: User Not Found
|
||||
components:
|
||||
schemas:
|
||||
User:
|
||||
title: User
|
||||
type: object
|
||||
description: ''
|
||||
x-examples:
|
||||
Alice Smith:
|
||||
id: 144
|
||||
firstName: Alice
|
||||
lastName: Smith
|
||||
email: alice.smith@gmail.com
|
||||
dateOfBirth: '1997-10-31'
|
||||
emailVerified: true
|
||||
signUpDate: '2019-08-24'
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
description: Unique identifier for the given user.
|
||||
firstName:
|
||||
type: string
|
||||
lastName:
|
||||
type: string
|
||||
email:
|
||||
type: string
|
||||
format: email
|
||||
dateOfBirth:
|
||||
type: string
|
||||
format: date
|
||||
example: '1997-10-31'
|
||||
emailVerified:
|
||||
type: boolean
|
||||
description: Set to true if the user's email has been verified.
|
||||
createDate:
|
||||
type: string
|
||||
format: date
|
||||
description: The date that the user was created.
|
||||
required:
|
||||
- id
|
||||
- firstName
|
||||
- lastName
|
||||
- email
|
||||
- emailVerified
|
||||
tags:
|
||||
- name: basic
|
||||
description: Basic tag
|
||||
@@ -0,0 +1,171 @@
|
||||
{
|
||||
"openapi" : "3.1.0",
|
||||
"info" : {
|
||||
"contact" : {
|
||||
"name" : "Beppe Catanese",
|
||||
"url" : "https://github.com/gcatanese"
|
||||
},
|
||||
"description" : "Sample API",
|
||||
"license" : {
|
||||
"name" : "Apache 2.0",
|
||||
"url" : "https://github.com/gcatanese"
|
||||
},
|
||||
"title" : "Basic",
|
||||
"version" : "1.0"
|
||||
},
|
||||
"servers" : [ {
|
||||
"description" : "dev server",
|
||||
"url" : "http://localhost:{port}/{version}",
|
||||
"variables": {
|
||||
"version": {
|
||||
"default": "v1",
|
||||
"description": "version of the API"
|
||||
},
|
||||
"port": {
|
||||
"enum": [
|
||||
"5000",
|
||||
"8080"
|
||||
],
|
||||
"default": "5000"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"description" : "test server",
|
||||
"url" : "http://localhost:{port}/{version}",
|
||||
"variables": {
|
||||
"version": {
|
||||
"default": "v1",
|
||||
"description": "version of the API"
|
||||
},
|
||||
"port": {
|
||||
"enum": [
|
||||
"5000",
|
||||
"8080"
|
||||
],
|
||||
"default": "5000"
|
||||
}
|
||||
}
|
||||
} ],
|
||||
"tags" : [ {
|
||||
"description" : "Basic tag",
|
||||
"name" : "basic"
|
||||
} ],
|
||||
"paths" : {
|
||||
"/users/{userId}" : {
|
||||
"get" : {
|
||||
"description" : "Get User Info by User ID",
|
||||
"operationId" : "get-users-userId",
|
||||
"parameters" : [ {
|
||||
"description" : "Unique identifier of the user",
|
||||
"explode" : false,
|
||||
"in" : "path",
|
||||
"name" : "userId",
|
||||
"required" : true,
|
||||
"schema" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"style" : "simple"
|
||||
} ],
|
||||
"responses" : {
|
||||
"200" : {
|
||||
"content" : {
|
||||
"application/json" : {
|
||||
"examples" : {
|
||||
"Get User Alice Smith (json)" : {
|
||||
"value" : {
|
||||
"id" : 142,
|
||||
"firstName" : "Alice",
|
||||
"lastName" : "Smith",
|
||||
"email" : "alice.smith@gmail.com",
|
||||
"dateOfBirth" : "1997-10-31",
|
||||
"emailVerified" : true,
|
||||
"signUpDate" : "2019-08-24"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema" : {
|
||||
"$ref" : "#/components/schemas/User"
|
||||
}
|
||||
},
|
||||
"application/xml" : {
|
||||
"examples" : {
|
||||
"Get User Alice Smith (xml)" : {
|
||||
"value" : {
|
||||
"id" : 143,
|
||||
"firstName" : "Alice",
|
||||
"lastName" : "Smith",
|
||||
"email" : "alice.smith@gmail.com",
|
||||
"dateOfBirth" : "1997-10-31",
|
||||
"emailVerified" : true,
|
||||
"signUpDate" : "2019-08-24"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema" : {
|
||||
"$ref" : "#/components/schemas/User"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description" : "User Found"
|
||||
},
|
||||
"404" : {
|
||||
"description" : "User Not Found"
|
||||
}
|
||||
},
|
||||
"summary" : "Get User",
|
||||
"tags" : [ "basic" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
"components" : {
|
||||
"schemas" : {
|
||||
"User" : {
|
||||
"description" : "",
|
||||
"properties" : {
|
||||
"id" : {
|
||||
"description" : "Unique identifier for the given user.",
|
||||
"type" : "integer"
|
||||
},
|
||||
"firstName" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"lastName" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"email" : {
|
||||
"format" : "email",
|
||||
"type" : "string"
|
||||
},
|
||||
"dateOfBirth" : {
|
||||
"example" : "1997-10-31",
|
||||
"format" : "date",
|
||||
"type" : "string"
|
||||
},
|
||||
"emailVerified" : {
|
||||
"description" : "Set to true if the user's email has been verified.",
|
||||
"type" : "boolean"
|
||||
},
|
||||
"createDate" : {
|
||||
"description" : "The date that the user was created.",
|
||||
"format" : "date",
|
||||
"type" : "string"
|
||||
}
|
||||
},
|
||||
"required" : [ "email", "emailVerified", "firstName", "id", "lastName" ],
|
||||
"title" : "User",
|
||||
"type" : "object",
|
||||
"x-examples" : {
|
||||
"Alice Smith" : {
|
||||
"id" : 144,
|
||||
"firstName" : "Alice",
|
||||
"lastName" : "Smith",
|
||||
"email" : "alice.smith@gmail.com",
|
||||
"dateOfBirth" : "1997-10-31",
|
||||
"emailVerified" : true,
|
||||
"signUpDate" : "2019-08-24"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: BasicExample
|
||||
version: '1.0'
|
||||
description: Sample API
|
||||
license:
|
||||
name: Apache 2.0
|
||||
url: 'https://github.com/gcatanese'
|
||||
servers:
|
||||
- url: 'http://localhost:5001'
|
||||
description: dev server
|
||||
- url: 'http://localhost:5001'
|
||||
description: test server
|
||||
paths:
|
||||
'/users/{userId}':
|
||||
patch:
|
||||
summary: Patch User
|
||||
description: Update User Info
|
||||
operationId: patch-users-userId
|
||||
tags:
|
||||
- basic
|
||||
parameters:
|
||||
- description: Unique identifier of the user
|
||||
name: userId
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
examples:
|
||||
patch-user:
|
||||
$ref: '#/components/examples/patch-user-example'
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
responses:
|
||||
'200':
|
||||
description: User Found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
examples:
|
||||
Get User Alice Smith (json):
|
||||
value:
|
||||
id: 142
|
||||
firstName: Alice
|
||||
lastName: Smith
|
||||
email: alice.smith@gmail.com
|
||||
dateOfBirth: '1997-10-31'
|
||||
emailVerified: true
|
||||
signUpDate: '2019-08-24'
|
||||
application/xml:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
examples:
|
||||
Get User Alice Smith (xml):
|
||||
value:
|
||||
id: 143
|
||||
firstName: Alice
|
||||
lastName: Smith
|
||||
email: alice.smith@gmail.com
|
||||
dateOfBirth: '1997-10-31'
|
||||
emailVerified: true
|
||||
signUpDate: '2019-08-24'
|
||||
'404':
|
||||
description: User Not Found
|
||||
components:
|
||||
schemas:
|
||||
User:
|
||||
title: User
|
||||
type: object
|
||||
description: ''
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
description: Unique identifier for the given user.
|
||||
firstName:
|
||||
type: string
|
||||
lastName:
|
||||
type: string
|
||||
email:
|
||||
type: string
|
||||
format: email
|
||||
dateOfBirth:
|
||||
type: string
|
||||
format: date
|
||||
emailVerified:
|
||||
type: boolean
|
||||
description: Set to true if the user's email has been verified.
|
||||
createDate:
|
||||
type: string
|
||||
format: date
|
||||
description: The date that the user was created.
|
||||
required:
|
||||
- id
|
||||
- firstName
|
||||
- lastName
|
||||
- email
|
||||
- emailVerified
|
||||
examples:
|
||||
patch-user-example:
|
||||
summary: Example patch user
|
||||
value:
|
||||
id: 001
|
||||
firstName: MY_VAR_NAME
|
||||
lastName: MY_VAR_LAST_NAME
|
||||
email: alotta.rotta@gmail.com
|
||||
dateOfBirth: '1997-10-31'
|
||||
emailVerified: true
|
||||
createDate: RANDOM_VALUE
|
||||
|
||||
tags:
|
||||
- name: basic
|
||||
description: Basic tag
|
||||
@@ -0,0 +1,252 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: Checkout Basic
|
||||
description: Checkout Basic
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: 'https://checkout-test.adyen.com/v71'
|
||||
paths:
|
||||
|
||||
/paymentMethods:
|
||||
get:
|
||||
tags:
|
||||
- Payments
|
||||
summary: Get payment methods
|
||||
operationId: get-payment-methods
|
||||
responses:
|
||||
200:
|
||||
description: OK - the request has succeeded.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/PaymentMethod'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/list-payment-methods'
|
||||
|
||||
/paymentMethods/{id}:
|
||||
get:
|
||||
tags:
|
||||
- Payments
|
||||
summary: Get payment method by id
|
||||
operationId: get-payment-method-by-id
|
||||
parameters:
|
||||
- description: Id of the payment method
|
||||
name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
basic:
|
||||
value: googlepay
|
||||
get-applepay:
|
||||
value: applepay
|
||||
responses:
|
||||
200:
|
||||
description: OK - the request has succeeded.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/PaymentMethod'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/googlepay-payment-method'
|
||||
get-applepay:
|
||||
$ref: '#/components/examples/applepay-payment-method'
|
||||
422:
|
||||
description: Unprocessable Entity - a request validation error.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CheckoutError'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/merchant-account-validation-error'
|
||||
/payments:
|
||||
post:
|
||||
tags:
|
||||
- Payments
|
||||
summary: Make a payment
|
||||
operationId: post-make-payment
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Payment'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/applepay-request'
|
||||
googlepay-success:
|
||||
$ref: '#/components/examples/googlepay-request'
|
||||
invalid-merchant-account:
|
||||
$ref: '#/components/examples/invalid-merchant-account'
|
||||
responses:
|
||||
200:
|
||||
description: OK - the request has succeeded.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/PaymentResult'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/payment-response-success'
|
||||
googlepay-success:
|
||||
$ref: '#/components/examples/payment-response-success'
|
||||
422:
|
||||
description: Unprocessable Entity - a request validation error.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CheckoutError'
|
||||
examples:
|
||||
invalid-merchant-account:
|
||||
$ref: '#/components/examples/merchant-account-validation-error'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
Payment:
|
||||
type: object
|
||||
properties:
|
||||
paymentMethod:
|
||||
$ref: '#/components/schemas/PaymentMethod'
|
||||
amount:
|
||||
$ref: '#/components/schemas/Amount'
|
||||
merchantAccount:
|
||||
type: string
|
||||
reference:
|
||||
type: string
|
||||
channel:
|
||||
type: string
|
||||
enum:
|
||||
- Web
|
||||
- iOS
|
||||
- Android
|
||||
required:
|
||||
- paymentMethod
|
||||
- amount
|
||||
- merchantAccount
|
||||
PaymentMethod:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
description: Name of the payment method
|
||||
type: string
|
||||
enum:
|
||||
- scheme
|
||||
- applepay
|
||||
- googleplay
|
||||
type:
|
||||
description: Type of the payment method
|
||||
type: string
|
||||
Amount:
|
||||
type: object
|
||||
properties:
|
||||
currency:
|
||||
description: The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
|
||||
maxLength: 3
|
||||
minLength: 3
|
||||
type: string
|
||||
value:
|
||||
description: The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).
|
||||
format: int64
|
||||
type: integer
|
||||
required:
|
||||
- value
|
||||
- currency
|
||||
PaymentResult:
|
||||
type: object
|
||||
properties:
|
||||
pspReference:
|
||||
description: PSP ref
|
||||
type: string
|
||||
resultCode:
|
||||
description: Result code
|
||||
type: string
|
||||
enum:
|
||||
- success
|
||||
- error
|
||||
- pending
|
||||
required:
|
||||
- pspReference
|
||||
- resultCode
|
||||
CheckoutError:
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
description: Error code
|
||||
type: string
|
||||
message:
|
||||
description: User-friendly message
|
||||
type: string
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
examples:
|
||||
applepay-request:
|
||||
summary: ApplePay request
|
||||
value:
|
||||
paymentMethod:
|
||||
name: applepay
|
||||
amount:
|
||||
currency: EUR
|
||||
value: 1000
|
||||
merchantAccount: YOUR_MERCHANT_ACCOUNT
|
||||
reference: YOUR_REFERENCE
|
||||
channel: iOS
|
||||
googlepay-request:
|
||||
summary: GooglePay request
|
||||
value:
|
||||
paymentMethod:
|
||||
name: googlepay
|
||||
amount:
|
||||
currency: EUR
|
||||
value: 1000
|
||||
merchantAccount: YOUR_MERCHANT_ACCOUNT
|
||||
reference: YOUR_REFERENCE
|
||||
channel: Android
|
||||
invalid-merchant-account:
|
||||
summary: Example with a merchant account that doesn't exist
|
||||
value:
|
||||
paymentMethod:
|
||||
name: googlepay
|
||||
amount:
|
||||
currency: EUR
|
||||
value: 1000
|
||||
merchantAccount: INVALID MERCHANT ACCOUNT
|
||||
reference: YOUR_REFERENCE
|
||||
channel: Android
|
||||
payment-response-success:
|
||||
summary: A successful payment response
|
||||
value:
|
||||
pspReference: PSP1234567890
|
||||
resultCode: success
|
||||
generic-error-400:
|
||||
summary: An error sample
|
||||
value:
|
||||
code: 400
|
||||
message: Invalid JSON payload
|
||||
merchant-account-validation-error:
|
||||
summary: Merchant account validation error
|
||||
value:
|
||||
code: 422 - 900
|
||||
message: Merchant account does not exist
|
||||
googlepay-payment-method:
|
||||
summary: The GooglePay payment method
|
||||
value:
|
||||
name: googlepay
|
||||
type: wallet
|
||||
applepay-payment-method:
|
||||
summary: The ApplePay payment method
|
||||
value:
|
||||
name: applepay
|
||||
type: wallet
|
||||
list-payment-methods:
|
||||
summary: List of all payment methods
|
||||
value:
|
||||
- name: googlepay
|
||||
type: wallet
|
||||
- name: applepay
|
||||
type: wallet
|
||||
@@ -0,0 +1,194 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: Checkout Basic
|
||||
description: Checkout Basic
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: 'https://checkout-test.adyen.com/v71'
|
||||
paths:
|
||||
|
||||
/paymentMethods/{id}:
|
||||
get:
|
||||
tags:
|
||||
- Payments
|
||||
summary: Get payment method by id
|
||||
operationId: get-payment-method-by-id
|
||||
parameters:
|
||||
- description: Id of the payment method
|
||||
name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
basic:
|
||||
value: googlepay
|
||||
get-applepay:
|
||||
value: applepay
|
||||
responses:
|
||||
200:
|
||||
description: OK - the request has succeeded.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/PaymentMethod'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/googlepay-payment-method'
|
||||
get-applepay:
|
||||
$ref: '#/components/examples/applepay-payment-method'
|
||||
422:
|
||||
description: Unprocessable Entity - a request validation error.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CheckoutError'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/merchant-account-validation-error'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
Payment:
|
||||
type: object
|
||||
properties:
|
||||
paymentMethod:
|
||||
$ref: '#/components/schemas/PaymentMethod'
|
||||
amount:
|
||||
$ref: '#/components/schemas/Amount'
|
||||
merchantAccount:
|
||||
type: string
|
||||
reference:
|
||||
type: string
|
||||
channel:
|
||||
type: string
|
||||
enum:
|
||||
- Web
|
||||
- iOS
|
||||
- Android
|
||||
required:
|
||||
- paymentMethod
|
||||
- amount
|
||||
- merchantAccount
|
||||
PaymentMethod:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
description: Name of the payment method
|
||||
type: string
|
||||
enum:
|
||||
- scheme
|
||||
- applepay
|
||||
- googleplay
|
||||
type:
|
||||
description: Type of the payment method
|
||||
type: string
|
||||
Amount:
|
||||
type: object
|
||||
properties:
|
||||
currency:
|
||||
description: The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
|
||||
maxLength: 3
|
||||
minLength: 3
|
||||
type: string
|
||||
value:
|
||||
description: The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).
|
||||
format: int64
|
||||
type: integer
|
||||
required:
|
||||
- value
|
||||
- currency
|
||||
PaymentResult:
|
||||
type: object
|
||||
properties:
|
||||
pspReference:
|
||||
description: PSP ref
|
||||
type: string
|
||||
resultCode:
|
||||
description: Result code
|
||||
type: string
|
||||
enum:
|
||||
- success
|
||||
- error
|
||||
- pending
|
||||
required:
|
||||
- pspReference
|
||||
- resultCode
|
||||
CheckoutError:
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
description: Error code
|
||||
type: string
|
||||
message:
|
||||
description: User-friendly message
|
||||
type: string
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
examples:
|
||||
applepay-request:
|
||||
summary: ApplePay request
|
||||
value:
|
||||
paymentMethod:
|
||||
name: applepay
|
||||
amount:
|
||||
currency: EUR
|
||||
value: 1000
|
||||
merchantAccount: YOUR_MERCHANT_ACCOUNT
|
||||
reference: YOUR_REFERENCE
|
||||
channel: iOS
|
||||
googlepay-request:
|
||||
summary: GooglePay request
|
||||
value:
|
||||
paymentMethod:
|
||||
name: googlepay
|
||||
amount:
|
||||
currency: EUR
|
||||
value: 1000
|
||||
merchantAccount: YOUR_MERCHANT_ACCOUNT
|
||||
reference: YOUR_REFERENCE
|
||||
channel: Android
|
||||
invalid-merchant-account:
|
||||
summary: Example with a merchant account that doesn't exist
|
||||
value:
|
||||
paymentMethod:
|
||||
name: googlepay
|
||||
amount:
|
||||
currency: EUR
|
||||
value: 1000
|
||||
merchantAccount: INVALID MERCHANT ACCOUNT
|
||||
reference: YOUR_REFERENCE
|
||||
channel: Android
|
||||
payment-response-success:
|
||||
summary: A successful payment response
|
||||
value:
|
||||
pspReference: PSP1234567890
|
||||
resultCode: success
|
||||
generic-error-400:
|
||||
summary: An error sample
|
||||
value:
|
||||
code: 400
|
||||
message: Invalid JSON payload
|
||||
merchant-account-validation-error:
|
||||
summary: Merchant account validation error
|
||||
value:
|
||||
code: 422 - 900
|
||||
message: Merchant account does not exist
|
||||
googlepay-payment-method:
|
||||
summary: The GooglePay payment method
|
||||
value:
|
||||
name: googlepay
|
||||
type: wallet
|
||||
applepay-payment-method:
|
||||
summary: The ApplePay payment method
|
||||
value:
|
||||
name: applepay
|
||||
type: wallet
|
||||
list-payment-methods:
|
||||
summary: List of all payment methods
|
||||
value:
|
||||
- name: googlepay
|
||||
type: wallet
|
||||
- name: applepay
|
||||
type: wallet
|
||||
@@ -0,0 +1,254 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: Checkout Basic
|
||||
description: Checkout Basic
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: 'https://checkout-test.adyen.com/v71'
|
||||
paths:
|
||||
|
||||
/paymentMethods:
|
||||
get:
|
||||
tags:
|
||||
- Payments
|
||||
summary: Get payment methods
|
||||
operationId: get-payment-methods
|
||||
responses:
|
||||
200:
|
||||
description: OK - the request has succeeded.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/PaymentMethod'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/list-payment-methods'
|
||||
|
||||
/paymentMethods/{id}:
|
||||
get:
|
||||
tags:
|
||||
- Payments
|
||||
summary: Get payment method by id
|
||||
operationId: get-payment-method-by-id
|
||||
parameters:
|
||||
- description: Id of the payment method
|
||||
name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
basic:
|
||||
value: googlepay
|
||||
get-applepay:
|
||||
value: applepay
|
||||
responses:
|
||||
200:
|
||||
description: OK - the request has succeeded.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/PaymentMethod'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/googlepay-payment-method'
|
||||
get-applepay:
|
||||
$ref: '#/components/examples/applepay-payment-method'
|
||||
422:
|
||||
description: Unprocessable Entity - a request validation error.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CheckoutError'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/merchant-account-validation-error'
|
||||
/payments:
|
||||
post:
|
||||
tags:
|
||||
- Payments
|
||||
summary: Make a payment
|
||||
operationId: post-make-payment
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Payment'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/applepay-request'
|
||||
googlepay-success:
|
||||
$ref: '#/components/examples/googlepay-request'
|
||||
invalid-merchant-account:
|
||||
$ref: '#/components/examples/invalid-merchant-account'
|
||||
responses:
|
||||
200:
|
||||
description: OK - the request has succeeded.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/PaymentResult'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/payment-response-success'
|
||||
googlepay-success:
|
||||
$ref: '#/components/examples/payment-response-success'
|
||||
422:
|
||||
description: Unprocessable Entity - a request validation error.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CheckoutError'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/merchant-account-validation-error'
|
||||
invalid-merchant-account:
|
||||
$ref: '#/components/examples/merchant-account-validation-error'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
Payment:
|
||||
type: object
|
||||
properties:
|
||||
paymentMethod:
|
||||
$ref: '#/components/schemas/PaymentMethod'
|
||||
amount:
|
||||
$ref: '#/components/schemas/Amount'
|
||||
merchantAccount:
|
||||
type: string
|
||||
reference:
|
||||
type: string
|
||||
channel:
|
||||
type: string
|
||||
enum:
|
||||
- Web
|
||||
- iOS
|
||||
- Android
|
||||
required:
|
||||
- paymentMethod
|
||||
- amount
|
||||
- merchantAccount
|
||||
PaymentMethod:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
description: Name of the payment method
|
||||
type: string
|
||||
enum:
|
||||
- scheme
|
||||
- applepay
|
||||
- googleplay
|
||||
type:
|
||||
description: Type of the payment method
|
||||
type: string
|
||||
Amount:
|
||||
type: object
|
||||
properties:
|
||||
currency:
|
||||
description: The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
|
||||
maxLength: 3
|
||||
minLength: 3
|
||||
type: string
|
||||
value:
|
||||
description: The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).
|
||||
format: int64
|
||||
type: integer
|
||||
required:
|
||||
- value
|
||||
- currency
|
||||
PaymentResult:
|
||||
type: object
|
||||
properties:
|
||||
pspReference:
|
||||
description: PSP ref
|
||||
type: string
|
||||
resultCode:
|
||||
description: Result code
|
||||
type: string
|
||||
enum:
|
||||
- success
|
||||
- error
|
||||
- pending
|
||||
required:
|
||||
- pspReference
|
||||
- resultCode
|
||||
CheckoutError:
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
description: Error code
|
||||
type: string
|
||||
message:
|
||||
description: User-friendly message
|
||||
type: string
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
examples:
|
||||
applepay-request:
|
||||
summary: ApplePay request
|
||||
value:
|
||||
paymentMethod:
|
||||
name: applepay
|
||||
amount:
|
||||
currency: EUR
|
||||
value: 1000
|
||||
merchantAccount: YOUR_MERCHANT_ACCOUNT
|
||||
reference: YOUR_REFERENCE
|
||||
channel: iOS
|
||||
googlepay-request:
|
||||
summary: GooglePay request
|
||||
value:
|
||||
paymentMethod:
|
||||
name: googlepay
|
||||
amount:
|
||||
currency: EUR
|
||||
value: 1000
|
||||
merchantAccount: YOUR_MERCHANT_ACCOUNT
|
||||
reference: YOUR_REFERENCE
|
||||
channel: Android
|
||||
invalid-merchant-account:
|
||||
summary: Example with a merchant account that doesn't exist
|
||||
value:
|
||||
paymentMethod:
|
||||
name: googlepay
|
||||
amount:
|
||||
currency: EUR
|
||||
value: 1000
|
||||
merchantAccount: INVALID MERCHANT ACCOUNT
|
||||
reference: YOUR_REFERENCE
|
||||
channel: Android
|
||||
payment-response-success:
|
||||
summary: A successful payment response
|
||||
value:
|
||||
pspReference: PSP1234567890
|
||||
resultCode: success
|
||||
generic-error-400:
|
||||
summary: An error sample
|
||||
value:
|
||||
code: 400
|
||||
message: Invalid JSON payload
|
||||
merchant-account-validation-error:
|
||||
summary: Merchant account validation error
|
||||
value:
|
||||
code: 422 - 900
|
||||
message: Merchant account does not exist
|
||||
googlepay-payment-method:
|
||||
summary: The GooglePay payment method
|
||||
value:
|
||||
name: googlepay
|
||||
type: wallet
|
||||
applepay-payment-method:
|
||||
summary: The ApplePay payment method
|
||||
value:
|
||||
name: applepay
|
||||
type: wallet
|
||||
list-payment-methods:
|
||||
summary: List of all payment methods
|
||||
value:
|
||||
- name: googlepay
|
||||
type: wallet
|
||||
- name: applepay
|
||||
type: wallet
|
||||
@@ -0,0 +1,201 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: Checkout Basic
|
||||
description: Checkout Basic
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: 'https://checkout-test.adyen.com/v71'
|
||||
paths:
|
||||
|
||||
/payments:
|
||||
post:
|
||||
tags:
|
||||
- Payments
|
||||
summary: Make a payment
|
||||
operationId: post-make-payment
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Payment'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/applepay-request'
|
||||
googlepay-success:
|
||||
$ref: '#/components/examples/googlepay-request'
|
||||
invalid-merchant-account:
|
||||
$ref: '#/components/examples/invalid-merchant-account'
|
||||
responses:
|
||||
200:
|
||||
description: OK - the request has succeeded.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/PaymentResult'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/payment-response-success'
|
||||
googlepay-success:
|
||||
$ref: '#/components/examples/payment-response-success'
|
||||
422:
|
||||
description: Unprocessable Entity - a request validation error.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CheckoutError'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/payment-response-failure'
|
||||
invalid-merchant-account:
|
||||
$ref: '#/components/examples/merchant-account-validation-error'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
Payment:
|
||||
type: object
|
||||
properties:
|
||||
paymentMethod:
|
||||
$ref: '#/components/schemas/PaymentMethod'
|
||||
amount:
|
||||
$ref: '#/components/schemas/Amount'
|
||||
merchantAccount:
|
||||
type: string
|
||||
reference:
|
||||
type: string
|
||||
channel:
|
||||
type: string
|
||||
enum:
|
||||
- Web
|
||||
- iOS
|
||||
- Android
|
||||
required:
|
||||
- paymentMethod
|
||||
- amount
|
||||
- merchantAccount
|
||||
PaymentMethod:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
description: Name of the payment method
|
||||
type: string
|
||||
enum:
|
||||
- scheme
|
||||
- applepay
|
||||
- googleplay
|
||||
type:
|
||||
description: Type of the payment method
|
||||
type: string
|
||||
Amount:
|
||||
type: object
|
||||
properties:
|
||||
currency:
|
||||
description: The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
|
||||
maxLength: 3
|
||||
minLength: 3
|
||||
type: string
|
||||
value:
|
||||
description: The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).
|
||||
format: int64
|
||||
type: integer
|
||||
required:
|
||||
- value
|
||||
- currency
|
||||
PaymentResult:
|
||||
type: object
|
||||
properties:
|
||||
pspReference:
|
||||
description: PSP ref
|
||||
type: string
|
||||
resultCode:
|
||||
description: Result code
|
||||
type: string
|
||||
enum:
|
||||
- success
|
||||
- error
|
||||
- pending
|
||||
required:
|
||||
- pspReference
|
||||
- resultCode
|
||||
CheckoutError:
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
description: Error code
|
||||
type: string
|
||||
message:
|
||||
description: User-friendly message
|
||||
type: string
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
examples:
|
||||
applepay-request:
|
||||
summary: ApplePay request
|
||||
value:
|
||||
paymentMethod:
|
||||
name: applepay
|
||||
amount:
|
||||
currency: EUR
|
||||
value: 1000
|
||||
merchantAccount: YOUR_MERCHANT_ACCOUNT
|
||||
reference: YOUR_REFERENCE
|
||||
channel: iOS
|
||||
googlepay-request:
|
||||
summary: GooglePay request
|
||||
value:
|
||||
paymentMethod:
|
||||
name: googlepay
|
||||
amount:
|
||||
currency: EUR
|
||||
value: 1000
|
||||
merchantAccount: YOUR_MERCHANT_ACCOUNT
|
||||
reference: YOUR_REFERENCE
|
||||
channel: Android
|
||||
invalid-merchant-account:
|
||||
summary: Example with a merchant account that doesn't exist
|
||||
value:
|
||||
paymentMethod:
|
||||
name: googlepay
|
||||
amount:
|
||||
currency: EUR
|
||||
value: 1000
|
||||
merchantAccount: INVALID MERCHANT ACCOUNT
|
||||
reference: YOUR_REFERENCE
|
||||
channel: Android
|
||||
payment-response-success:
|
||||
summary: A successful payment response
|
||||
value:
|
||||
pspReference: PSP1234567890
|
||||
resultCode: success
|
||||
generic-error-400:
|
||||
summary: An error sample
|
||||
value:
|
||||
code: 400
|
||||
message: Invalid JSON payload
|
||||
payment-response-failure:
|
||||
summary: FAILURE Merchant account validation error
|
||||
value:
|
||||
code: 422 - 900
|
||||
message: FAILURE Merchant account does not exist
|
||||
merchant-account-validation-error:
|
||||
summary: Merchant account validation error
|
||||
value:
|
||||
code: 422 - 900
|
||||
message: Merchant account does not exist
|
||||
googlepay-payment-method:
|
||||
summary: The GooglePay payment method
|
||||
value:
|
||||
name: googlepay
|
||||
type: wallet
|
||||
applepay-payment-method:
|
||||
summary: The ApplePay payment method
|
||||
value:
|
||||
name: applepay
|
||||
type: wallet
|
||||
list-payment-methods:
|
||||
summary: List of all payment methods
|
||||
value:
|
||||
- name: googlepay
|
||||
type: wallet
|
||||
- name: applepay
|
||||
type: wallet
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"openapi" : "3.1.0",
|
||||
"info" : {
|
||||
"description" : "Sample API",
|
||||
"title" : "Basic",
|
||||
"version" : "1.0"
|
||||
},
|
||||
"tags" : [ {
|
||||
"description" : "Basic tag",
|
||||
"name" : "basic"
|
||||
} ],
|
||||
"paths" : {
|
||||
"/ws" : {
|
||||
"post" : {
|
||||
"description" : "Create",
|
||||
"operationId" : "ws-post",
|
||||
"requestBody" : {
|
||||
"content" : {
|
||||
"application/json" : {
|
||||
"examples" : {
|
||||
"basic" : {
|
||||
"$ref" : "#/components/examples/ex-1"
|
||||
}
|
||||
},
|
||||
"schema" : {
|
||||
"$ref" : "#/components/schemas/Item"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses" : {
|
||||
"200" : {
|
||||
"content" : {
|
||||
"application/json" : {
|
||||
"schema" : {
|
||||
"$ref" : "#/components/schemas/Item"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description" : "Item created"
|
||||
}
|
||||
},
|
||||
"summary" : "Create",
|
||||
"tags" : [ "basic" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
"components" : {
|
||||
"schemas" : {
|
||||
"Item" : {
|
||||
"description" : "",
|
||||
"properties" : {
|
||||
"id" : {
|
||||
"description" : "Item id",
|
||||
"type" : "integer"
|
||||
},
|
||||
"acceptHeader" : {
|
||||
"type" : "string"
|
||||
}
|
||||
},
|
||||
"title" : "item",
|
||||
"type" : "object"
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"ex-1": {
|
||||
"summary" : "Example 1",
|
||||
"value" : {
|
||||
"id": 1,
|
||||
"acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
28623
modules/openapi-generator/src/test/resources/3_0/jetbrains/MgmtApi.json
Normal file
28623
modules/openapi-generator/src/test/resources/3_0/jetbrains/MgmtApi.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,364 @@
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Sample project
|
||||
version: '1.0'
|
||||
contact:
|
||||
name: Beppe Catanese
|
||||
email: gcatanese@yahoo.com
|
||||
url: 'https://github.com/gcatanese'
|
||||
description: 'Sample API Check "API Key" '
|
||||
license:
|
||||
name: Apache 2.0
|
||||
url: 'https://github.com/gcatanese'
|
||||
servers:
|
||||
- url: 'http://localhost:{port}/{version}'
|
||||
description: dev server
|
||||
variables:
|
||||
port:
|
||||
description: Port number
|
||||
enum:
|
||||
- '5000'
|
||||
- '8080'
|
||||
default: '5000'
|
||||
version:
|
||||
default: v1
|
||||
description: API version
|
||||
- url: 'http://localhost:{port}/{version}'
|
||||
description: test server
|
||||
variables:
|
||||
port:
|
||||
description: Port number
|
||||
enum:
|
||||
- '5000'
|
||||
- '8080'
|
||||
default: '5000'
|
||||
version:
|
||||
default: v1
|
||||
description: API version
|
||||
paths:
|
||||
'/users/':
|
||||
get:
|
||||
summary: Get User Info by Query Param
|
||||
operationId: get-users-query-id
|
||||
description: Retrieve the information of the user with the matching user ID.
|
||||
tags:
|
||||
- basic
|
||||
parameters:
|
||||
- description: Query Id.
|
||||
name: pUserId
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 888
|
||||
- description: Custom HTTP header
|
||||
name: Custom-Header
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
- description: Custom HTTP header with default
|
||||
name: Another-Custom-Header
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
default: abc
|
||||
|
||||
responses:
|
||||
'200':
|
||||
description: User Found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
example:
|
||||
id: schema-example
|
||||
firstName: Alice
|
||||
lastName: Smith333
|
||||
email: alice.smith@gmail.com
|
||||
dateOfBirth: '1997-10-31'
|
||||
emailVerified: true
|
||||
signUpDate: '2019-08-24'
|
||||
examples:
|
||||
Get User Alice Smith:
|
||||
value:
|
||||
id: 142
|
||||
firstName: Alice
|
||||
lastName: Smith
|
||||
email: alice.smith@gmail.com
|
||||
dateOfBirth: '1997-10-31'
|
||||
emailVerified: true
|
||||
signUpDate: '2019-08-24'
|
||||
Get User Phil Smith:
|
||||
value:
|
||||
id: 143
|
||||
firstName: Phil
|
||||
lastName: Smith
|
||||
email: alice.smith@gmail.com
|
||||
dateOfBirth: '1997-10-31'
|
||||
emailVerified: true
|
||||
signUpDate: '2019-08-24'
|
||||
'404':
|
||||
description: User Not Found
|
||||
'/users/{userId}':
|
||||
parameters:
|
||||
- schema:
|
||||
type: integer
|
||||
examples:
|
||||
a:
|
||||
value: 1
|
||||
summary: a summary
|
||||
b:
|
||||
value: 2
|
||||
summary: b summary
|
||||
name: userId
|
||||
in: path
|
||||
required: true
|
||||
description: Id of an existing user.
|
||||
- schema:
|
||||
type: string
|
||||
default: code_one
|
||||
name: strCode
|
||||
in: header
|
||||
description: Code as header
|
||||
- schema:
|
||||
type: string
|
||||
name: strCode2
|
||||
in: header
|
||||
description: Code as header2
|
||||
get:
|
||||
summary: Get User Info by User ID
|
||||
tags:
|
||||
- advanced
|
||||
responses:
|
||||
'200':
|
||||
description: User Found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
example:
|
||||
id: 9998
|
||||
firstName: Alice9998 resp example
|
||||
lastName: Smith9998
|
||||
email: alice.smith@gmail.com
|
||||
dateOfBirth: '1997-10-31'
|
||||
emailVerified: true
|
||||
createDate: '2019-08-24'
|
||||
'404':
|
||||
description: User Not Found
|
||||
operationId: get-users-userId
|
||||
description: Retrieve the information of the user with the matching user ID.
|
||||
patch:
|
||||
summary: Update User Information
|
||||
deprecated: true
|
||||
operationId: patch-users-userId
|
||||
responses:
|
||||
'200':
|
||||
description: User Updated
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
examples:
|
||||
Updated User Rebecca Baker:
|
||||
value:
|
||||
id: 13
|
||||
firstName: Rebecca
|
||||
lastName: Baker
|
||||
email: rebecca@gmail.com
|
||||
dateOfBirth: '1985-10-02'
|
||||
emailVerified: false
|
||||
createDate: '2019-08-24'
|
||||
'404':
|
||||
description: User Not Found
|
||||
'409':
|
||||
description: Email Already Taken
|
||||
description: Update the information of an existing user.
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
firstName:
|
||||
type: string
|
||||
lastName:
|
||||
type: string
|
||||
email:
|
||||
type: string
|
||||
description: >-
|
||||
If a new email is given, the user's email verified property
|
||||
will be set to false.
|
||||
dateOfBirth:
|
||||
type: string
|
||||
examples:
|
||||
Update First Name:
|
||||
value:
|
||||
firstName: Rebecca
|
||||
Update Email:
|
||||
value:
|
||||
email: rebecca@gmail.com
|
||||
Update Last Name & Date of Birth:
|
||||
value:
|
||||
lastName: Baker
|
||||
dateOfBirth: '1985-10-02'
|
||||
description: Patch user properties to update.
|
||||
/user:
|
||||
post:
|
||||
summary: Create New User
|
||||
operationId: post-user
|
||||
responses:
|
||||
'200':
|
||||
description: User Created
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/get-user-basic'
|
||||
'400':
|
||||
description: Missing Required Information
|
||||
'409':
|
||||
description: Email Already Taken
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
firstName:
|
||||
type: string
|
||||
lastName:
|
||||
type: string
|
||||
email:
|
||||
type: string
|
||||
dateOfBirth:
|
||||
type: string
|
||||
format: date
|
||||
required:
|
||||
- firstName
|
||||
- lastName
|
||||
- email
|
||||
- dateOfBirth
|
||||
examples:
|
||||
basic:
|
||||
$ref: '#/components/examples/get-user-basic'
|
||||
description: Post the necessary fields for the API to create a new user.
|
||||
description: Create a new user.
|
||||
tags:
|
||||
- basic
|
||||
'/groups/{groupId}':
|
||||
get:
|
||||
summary: Get group by ID
|
||||
tags:
|
||||
- advanced
|
||||
parameters:
|
||||
- description: group Id
|
||||
name: groupId
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
default: 1
|
||||
responses:
|
||||
'200':
|
||||
description: Group Found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Group'
|
||||
'404':
|
||||
description: Group Not Found
|
||||
operationId: get-groups-groupId
|
||||
description: Get group of users
|
||||
|
||||
components:
|
||||
securitySchemes:
|
||||
BasicAuth:
|
||||
type: http
|
||||
scheme: basic
|
||||
BearerAuth:
|
||||
type: http
|
||||
scheme: bearer
|
||||
ApiKeyAuth:
|
||||
type: apiKey
|
||||
name: X-API-Key
|
||||
in: header
|
||||
schemas:
|
||||
User:
|
||||
title: User
|
||||
type: object
|
||||
description: ''
|
||||
example:
|
||||
id: 999
|
||||
firstName: Alice9 schema example
|
||||
lastName: Smith9
|
||||
email: alice.smith@gmail.com
|
||||
dateOfBirth: '1997-10-31'
|
||||
emailVerified: true
|
||||
createDate: '2019-08-24'
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
description: Unique identifier for the given user.
|
||||
example: 0
|
||||
firstName:
|
||||
type: string
|
||||
example: Alix
|
||||
lastName:
|
||||
type: string
|
||||
example: Smith
|
||||
email:
|
||||
type: string
|
||||
format: email
|
||||
example: alix.smith@gmail.com
|
||||
dateOfBirth:
|
||||
type: string
|
||||
format: date
|
||||
example: '1997-10-31'
|
||||
emailVerified:
|
||||
type: boolean
|
||||
description: Set to true if the user's email has been verified.
|
||||
example: true
|
||||
createDate:
|
||||
type: string
|
||||
format: date
|
||||
description: The date that the user was created.
|
||||
example: '2019-08-24'
|
||||
required:
|
||||
- id
|
||||
- firstName
|
||||
- lastName
|
||||
- email
|
||||
- emailVerified
|
||||
Group:
|
||||
title: Group
|
||||
type: object
|
||||
description: ''
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
description: Unique identifier for the given group.
|
||||
name:
|
||||
type: string
|
||||
example: admin
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
examples:
|
||||
get-user-basic:
|
||||
summary: Example request for Get User
|
||||
value:
|
||||
id: 777
|
||||
firstName: Alotta
|
||||
lastName: Rotta
|
||||
email: alotta.rotta@gmail.com
|
||||
dateOfBirth: '1997-10-31'
|
||||
emailVerified: true
|
||||
createDate: '2019-08-24'
|
||||
tags:
|
||||
- name: basic
|
||||
description: Basic tag
|
||||
- name: advanced
|
||||
description: Advanced tag
|
||||
@@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
@@ -0,0 +1,3 @@
|
||||
.openapi-generator-ignore
|
||||
Apis/PaymentsApi.http
|
||||
README.md
|
||||
@@ -0,0 +1 @@
|
||||
7.4.0-SNAPSHOT
|
||||
@@ -0,0 +1,17 @@
|
||||
## PaymentsApi
|
||||
|
||||
### Get payment method by id
|
||||
##
|
||||
# @name getPaymentMethodById
|
||||
GET https://checkout-test.adyen.com/v71/paymentMethods/{{id}}
|
||||
|
||||
### Get payment methods
|
||||
##
|
||||
# @name getPaymentMethods
|
||||
GET https://checkout-test.adyen.com/v71/paymentMethods
|
||||
|
||||
### Make a payment
|
||||
##
|
||||
# @name postMakePayment
|
||||
POST https://checkout-test.adyen.com/v71/payments
|
||||
Content-Type: application/json
|
||||
@@ -0,0 +1,22 @@
|
||||
# Checkout Basic - Jetbrains API Client
|
||||
|
||||
## OpenAPI File description
|
||||
|
||||
Checkout Basic
|
||||
|
||||
* API basepath : [https://checkout-test.adyen.com/v71](https://checkout-test.adyen.com/v71)
|
||||
* Version : 1.0.0
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *https://checkout-test.adyen.com/v71*, but will link to the `.http` file that contains the endpoint definition
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*PaymentsApi* | [**getPaymentMethodById**](Apis/PaymentsApi.http#getpaymentmethodbyid) | **GET** /paymentMethods/{id} | Get payment method by id
|
||||
*PaymentsApi* | [**getPaymentMethods**](Apis/PaymentsApi.http#getpaymentmethods) | **GET** /paymentMethods | Get payment methods
|
||||
*PaymentsApi* | [**postMakePayment**](Apis/PaymentsApi.http#postmakepayment) | **POST** /payments | Make a payment
|
||||
|
||||
|
||||
|
||||
_This client was generated by the jetbrains-http-client of OpenAPI Generator_
|
||||
Reference in New Issue
Block a user