Having fun creating a barebones curl generator

This commit is contained in:
Julien Lengrand-Lambert
2024-02-22 16:54:27 +01:00
parent 6c86c2d3cf
commit 10dec83c6c
44 changed files with 17459 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
generatorName: curl
outputDir: samples/client/adyen/curl
inputSpec: modules/openapi-generator/src/test/resources/3_1/CheckoutService-v71.yaml
templateDir: modules/openapi-generator/src/main/resources/curl
additionalProperties:
hideGenerationTimestamp: "true"

View File

@@ -0,0 +1,6 @@
generatorName: curl
outputDir: samples/client/petstore/curl
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/curl
additionalProperties:
hideGenerationTimestamp: "true"

View File

@@ -0,0 +1,43 @@
package org.openapitools.codegen.languages;
import org.openapitools.codegen.*;
import io.swagger.models.properties.ArrayProperty;
import io.swagger.models.properties.MapProperty;
import io.swagger.models.properties.Property;
import io.swagger.models.parameters.Parameter;
import java.io.File;
import java.util.*;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class CurlClientCodegen extends DefaultCodegen implements CodegenConfig {
public static final String PROJECT_NAME = "projectName";
private final Logger LOGGER = LoggerFactory.getLogger(CurlClientCodegen.class);
public CodegenType getTag() {
return CodegenType.CLIENT;
}
public String getName() {
return "curl";
}
public String getHelp() {
return "Generates a curl client.";
}
public CurlClientCodegen() {
super();
outputFolder = "generated-code" + File.separator + "curl";
apiTemplateFiles.put("api.mustache", ".sh");
embeddedTemplateDir = templateDir = "curl";
apiPackage = "Apis";
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
}
}

View File

@@ -146,3 +146,5 @@ org.openapitools.codegen.languages.WsdlSchemaCodegen
org.openapitools.codegen.languages.XojoClientCodegen
org.openapitools.codegen.languages.ZapierClientCodegen
org.openapitools.codegen.languages.RustAxumServerCodegen
org.openapitools.codegen.languages.CurlClientCodegen

View File

@@ -0,0 +1,16 @@
#!/bin/sh
## {{classname}}
{{#operations}}
{{#operation}}
### {{#summary}}{{summary}}{{/summary}}
# {{operationId}}
curl -X {{httpMethod}} {{basePath}}{{path}} \
{{#consumes}}-H 'Content-Type: {{{mediaType}}}' \ {{/consumes}}
{{#consumes}}-H 'Accept: {{{mediaType}}}' \ {{/consumes}}
-H "x-API-key: YOUR_API_KEY"
{{/operation}}
{{/operations}}

View File

@@ -0,0 +1,244 @@
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'
/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

File diff suppressed because it is too large Load Diff

View File

@@ -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

View File

@@ -0,0 +1,9 @@
Apis/ClassicCheckoutSDKApi.sh
Apis/DonationsApi.sh
Apis/ModificationsApi.sh
Apis/OrdersApi.sh
Apis/PaymentLinksApi.sh
Apis/PaymentsApi.sh
Apis/RecurringApi.sh
Apis/UtilityApi.sh
README.md

View File

@@ -0,0 +1 @@
7.4.0-SNAPSHOT

View File

@@ -0,0 +1,21 @@
#!/bin/sh
## ClassicCheckoutSDKApi
### Create a payment session
# postPaymentSession
curl -X POST https://checkout-test.adyen.com/v71/paymentSession \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Verify a payment result
# postPaymentsResult
curl -X POST https://checkout-test.adyen.com/v71/payments/result \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"

View File

@@ -0,0 +1,12 @@
#!/bin/sh
## DonationsApi
### Start a transaction for donations
# postDonations
curl -X POST https://checkout-test.adyen.com/v71/donations \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"

View File

@@ -0,0 +1,57 @@
#!/bin/sh
## ModificationsApi
### Cancel an authorised payment
# postCancels
curl -X POST https://checkout-test.adyen.com/v71/cancels \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Update an authorised amount
# postPaymentsPaymentPspReferenceAmountUpdates
curl -X POST https://checkout-test.adyen.com/v71/payments/{paymentPspReference}/amountUpdates \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Cancel an authorised payment
# postPaymentsPaymentPspReferenceCancels
curl -X POST https://checkout-test.adyen.com/v71/payments/{paymentPspReference}/cancels \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Capture an authorised payment
# postPaymentsPaymentPspReferenceCaptures
curl -X POST https://checkout-test.adyen.com/v71/payments/{paymentPspReference}/captures \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Refund a captured payment
# postPaymentsPaymentPspReferenceRefunds
curl -X POST https://checkout-test.adyen.com/v71/payments/{paymentPspReference}/refunds \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Refund or cancel a payment
# postPaymentsPaymentPspReferenceReversals
curl -X POST https://checkout-test.adyen.com/v71/payments/{paymentPspReference}/reversals \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"

View File

@@ -0,0 +1,30 @@
#!/bin/sh
## OrdersApi
### Create an order
# postOrders
curl -X POST https://checkout-test.adyen.com/v71/orders \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Cancel an order
# postOrdersCancel
curl -X POST https://checkout-test.adyen.com/v71/orders/cancel \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Get the balance of a gift card
# postPaymentMethodsBalance
curl -X POST https://checkout-test.adyen.com/v71/paymentMethods/balance \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"

View File

@@ -0,0 +1,30 @@
#!/bin/sh
## PaymentLinksApi
### Get a payment link
# getPaymentLinksLinkId
curl -X GET https://checkout-test.adyen.com/v71/paymentLinks/{linkId} \
-H "x-API-key: YOUR_API_KEY"
### Update the status of a payment link
# patchPaymentLinksLinkId
curl -X PATCH https://checkout-test.adyen.com/v71/paymentLinks/{linkId} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Create a payment link
# postPaymentLinks
curl -X POST https://checkout-test.adyen.com/v71/paymentLinks \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"

View File

@@ -0,0 +1,57 @@
#!/bin/sh
## PaymentsApi
### Get the result of a payment session
# getSessionsSessionId
curl -X GET https://checkout-test.adyen.com/v71/sessions/{sessionId} \
-H "x-API-key: YOUR_API_KEY"
### Get the list of brands on the card
# postCardDetails
curl -X POST https://checkout-test.adyen.com/v71/cardDetails \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Get a list of available payment methods
# postPaymentMethods
curl -X POST https://checkout-test.adyen.com/v71/paymentMethods \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Start a transaction
# postPayments
curl -X POST https://checkout-test.adyen.com/v71/payments \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Submit details for a payment
# postPaymentsDetails
curl -X POST https://checkout-test.adyen.com/v71/payments/details \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Create a payment session
# postSessions
curl -X POST https://checkout-test.adyen.com/v71/sessions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"

View File

@@ -0,0 +1,21 @@
#!/bin/sh
## RecurringApi
### Delete a token for stored payment details
# deleteStoredPaymentMethodsStoredPaymentMethodId
curl -X DELETE https://checkout-test.adyen.com/v71/storedPaymentMethods/{storedPaymentMethodId} \
-H "x-API-key: YOUR_API_KEY"
### Get tokens for stored payment details
# getStoredPaymentMethods
curl -X GET https://checkout-test.adyen.com/v71/storedPaymentMethods \
-H "x-API-key: YOUR_API_KEY"

View File

@@ -0,0 +1,21 @@
#!/bin/sh
## UtilityApi
### Get an Apple Pay session
# postApplePaySessions
curl -X POST https://checkout-test.adyen.com/v71/applePay/sessions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Create originKey values for domains
# postOriginKeys
curl -X POST https://checkout-test.adyen.com/v71/originKeys \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"

View File

View File

@@ -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

View File

@@ -0,0 +1,2 @@
Apis/BasicApi.http
README.md

View File

@@ -0,0 +1 @@
unset

View File

@@ -0,0 +1,11 @@
## BasicApi
##### Get User
### Get User
## Get User Info by User ID
# @name getUsersUserId
GET http://localhost:5001/v1/users/{{userId}}

View File

@@ -0,0 +1,20 @@
# Basic - Jetbrains API Client
## OpenAPI File description
Sample API
* API basepath : [http://localhost:5001/v1](http://localhost:5001/v1)
* Version : 1.0
## Documentation for API Endpoints
All URIs are relative to *http://localhost:5001/v1*, but will link to the `.http` file that contains the endpoint definition
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BasicApi* | [**getUsersUserId**](Apis/BasicApi.http#getusersuserid) | **GET** /users/{userId} | Get User
_This client was generated by the jetbrains-http-client of OpenAPI Generator_

View File

@@ -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

View File

@@ -0,0 +1,5 @@
.openapi-generator-ignore
Apis/PetApi.http
Apis/StoreApi.http
Apis/UserApi.http
README.md

View File

@@ -0,0 +1 @@
unset

View File

@@ -0,0 +1,65 @@
## PetApi
### Add a new pet to the store
##
# @name addPet
POST http://petstore.swagger.io/v2/pet
Content-Type: application/json
Content-Type: application/xml
{application/json=CodegenMediaType{schema=CodegenProperty{openApiType='Pet', baseName='SchemaForRequestBodyApplicationJson', complexType='Pet', getter='getSchemaForRequestBodyApplicationJson', setter='setSchemaForRequestBodyApplicationJson', description='null', dataType='Pet', datatypeWithEnum='Pet', dataFormat='null', name='SchemaForRequestBodyApplicationJson', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.SchemaForRequestBodyApplicationJson;', baseType='Pet', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"$ref" : "#/components/schemas/Pet"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=true, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='SchemaForRequestBodyApplicationJson', nameInSnakeCase='SCHEMA_FOR_REQUEST_BODY_APPLICATION_JSON', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='Pet', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=#/components/schemas/Pet, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, encoding=null, vendorExtensions={}}, application/xml=CodegenMediaType{schema=CodegenProperty{openApiType='Pet', baseName='SchemaForRequestBodyApplicationXml', complexType='Pet', getter='getSchemaForRequestBodyApplicationXml', setter='setSchemaForRequestBodyApplicationXml', description='null', dataType='Pet', datatypeWithEnum='Pet', dataFormat='null', name='SchemaForRequestBodyApplicationXml', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.SchemaForRequestBodyApplicationXml;', baseType='Pet', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"$ref" : "#/components/schemas/Pet"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=true, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='SchemaForRequestBodyApplicationXml', nameInSnakeCase='SCHEMA_FOR_REQUEST_BODY_APPLICATION_XML', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='Pet', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=#/components/schemas/Pet, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, encoding=null, vendorExtensions={}}}
### Deletes a pet
##
# @name deletePet
DELETE http://petstore.swagger.io/v2/pet/{{petId}}
### Finds Pets by status
## Multiple status values can be provided with comma separated strings
# @name findPetsByStatus
GET http://petstore.swagger.io/v2/pet/findByStatus
### Finds Pets by tags
## Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
# @name findPetsByTags
GET http://petstore.swagger.io/v2/pet/findByTags
### Find pet by ID
## Returns a single pet
# @name getPetById
GET http://petstore.swagger.io/v2/pet/{{petId}}
### Update an existing pet
##
# @name updatePet
PUT http://petstore.swagger.io/v2/pet
Content-Type: application/json
Content-Type: application/xml
{application/json=CodegenMediaType{schema=CodegenProperty{openApiType='Pet', baseName='SchemaForRequestBodyApplicationJson', complexType='Pet', getter='getSchemaForRequestBodyApplicationJson', setter='setSchemaForRequestBodyApplicationJson', description='null', dataType='Pet', datatypeWithEnum='Pet', dataFormat='null', name='SchemaForRequestBodyApplicationJson', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.SchemaForRequestBodyApplicationJson;', baseType='Pet', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"$ref" : "#/components/schemas/Pet"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=true, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='SchemaForRequestBodyApplicationJson', nameInSnakeCase='SCHEMA_FOR_REQUEST_BODY_APPLICATION_JSON', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='Pet', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=#/components/schemas/Pet, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, encoding=null, vendorExtensions={}}, application/xml=CodegenMediaType{schema=CodegenProperty{openApiType='Pet', baseName='SchemaForRequestBodyApplicationXml', complexType='Pet', getter='getSchemaForRequestBodyApplicationXml', setter='setSchemaForRequestBodyApplicationXml', description='null', dataType='Pet', datatypeWithEnum='Pet', dataFormat='null', name='SchemaForRequestBodyApplicationXml', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.SchemaForRequestBodyApplicationXml;', baseType='Pet', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"$ref" : "#/components/schemas/Pet"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=true, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='SchemaForRequestBodyApplicationXml', nameInSnakeCase='SCHEMA_FOR_REQUEST_BODY_APPLICATION_XML', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='Pet', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=#/components/schemas/Pet, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, encoding=null, vendorExtensions={}}}
### Updates a pet in the store with form data
##
# @name updatePetWithForm
POST http://petstore.swagger.io/v2/pet/{{petId}}
Content-Type: application/x-www-form-urlencoded
### uploads an image
##
# @name uploadFile
POST http://petstore.swagger.io/v2/pet/{{petId}}/uploadImage
Content-Type: multipart/form-data

View File

@@ -0,0 +1,29 @@
## StoreApi
### Delete purchase order by ID
## For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
# @name deleteOrder
DELETE http://petstore.swagger.io/v2/store/order/{{orderId}}
### Returns pet inventories by status
## Returns a map of status codes to quantities
# @name getInventory
GET http://petstore.swagger.io/v2/store/inventory
### Find purchase order by ID
## For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
# @name getOrderById
GET http://petstore.swagger.io/v2/store/order/{{orderId}}
### Place an order for a pet
##
# @name placeOrder
POST http://petstore.swagger.io/v2/store/order
Content-Type: application/json
{application/json=CodegenMediaType{schema=CodegenProperty{openApiType='Order', baseName='SchemaForRequestBodyApplicationJson', complexType='Order', getter='getSchemaForRequestBodyApplicationJson', setter='setSchemaForRequestBodyApplicationJson', description='null', dataType='Order', datatypeWithEnum='Order', dataFormat='null', name='SchemaForRequestBodyApplicationJson', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.SchemaForRequestBodyApplicationJson;', baseType='Order', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"$ref" : "#/components/schemas/Order"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=true, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='SchemaForRequestBodyApplicationJson', nameInSnakeCase='SCHEMA_FOR_REQUEST_BODY_APPLICATION_JSON', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='Order', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=#/components/schemas/Order, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, encoding=null, vendorExtensions={}}}

View File

@@ -0,0 +1,79 @@
## UserApi
### Create user
## This can only be done by the logged in user.
# @name createUser
POST http://petstore.swagger.io/v2/user
Content-Type: application/json
{application/json=CodegenMediaType{schema=CodegenProperty{openApiType='User', baseName='SchemaForRequestBodyApplicationJson', complexType='User', getter='getSchemaForRequestBodyApplicationJson', setter='setSchemaForRequestBodyApplicationJson', description='null', dataType='User', datatypeWithEnum='User', dataFormat='null', name='SchemaForRequestBodyApplicationJson', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.SchemaForRequestBodyApplicationJson;', baseType='User', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"$ref" : "#/components/schemas/User"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=true, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='SchemaForRequestBodyApplicationJson', nameInSnakeCase='SCHEMA_FOR_REQUEST_BODY_APPLICATION_JSON', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='User', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=#/components/schemas/User, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, encoding=null, vendorExtensions={}}}
### Creates list of users with given input array
##
# @name createUsersWithArrayInput
POST http://petstore.swagger.io/v2/user/createWithArray
Content-Type: application/json
{application/json=CodegenMediaType{schema=CodegenProperty{openApiType='array', baseName='SchemaForRequestBodyApplicationJson', complexType='User', getter='getSchemaForRequestBodyApplicationJson', setter='setSchemaForRequestBodyApplicationJson', description='null', dataType='List', datatypeWithEnum='List', dataFormat='null', name='SchemaForRequestBodyApplicationJson', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.SchemaForRequestBodyApplicationJson;', baseType='array', containerType='array', containerTypeMapped='List', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"items" : {
"$ref" : "#/components/schemas/User"
},
"type" : "array"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=false, isContainer=true, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=true, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=CodegenProperty{openApiType='User', baseName='SchemaForRequestBodyApplicationJson', complexType='User', getter='getSchemaForRequestBodyApplicationJson', setter='setSchemaForRequestBodyApplicationJson', description='null', dataType='User', datatypeWithEnum='User', dataFormat='null', name='SchemaForRequestBodyApplicationJson', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.SchemaForRequestBodyApplicationJson;', baseType='User', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"$ref" : "#/components/schemas/User"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=true, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='SchemaForRequestBodyApplicationJson', nameInSnakeCase='SCHEMA_FOR_REQUEST_BODY_APPLICATION_JSON', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='User', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=#/components/schemas/User, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=CodegenProperty{openApiType='User', baseName='SchemaForRequestBodyApplicationJson', complexType='User', getter='getSchemaForRequestBodyApplicationJson', setter='setSchemaForRequestBodyApplicationJson', description='null', dataType='User', datatypeWithEnum='User', dataFormat='null', name='SchemaForRequestBodyApplicationJson', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.SchemaForRequestBodyApplicationJson;', baseType='User', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"$ref" : "#/components/schemas/User"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=true, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='SchemaForRequestBodyApplicationJson', nameInSnakeCase='SCHEMA_FOR_REQUEST_BODY_APPLICATION_JSON', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='User', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=#/components/schemas/User, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='SchemaForRequestBodyApplicationJson', nameInSnakeCase='SCHEMA_FOR_REQUEST_BODY_APPLICATION_JSON', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, encoding=null, vendorExtensions={}}}
### Creates list of users with given input array
##
# @name createUsersWithListInput
POST http://petstore.swagger.io/v2/user/createWithList
Content-Type: application/json
{application/json=CodegenMediaType{schema=CodegenProperty{openApiType='array', baseName='SchemaForRequestBodyApplicationJson', complexType='User', getter='getSchemaForRequestBodyApplicationJson', setter='setSchemaForRequestBodyApplicationJson', description='null', dataType='List', datatypeWithEnum='List', dataFormat='null', name='SchemaForRequestBodyApplicationJson', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.SchemaForRequestBodyApplicationJson;', baseType='array', containerType='array', containerTypeMapped='List', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"items" : {
"$ref" : "#/components/schemas/User"
},
"type" : "array"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=false, isContainer=true, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=true, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=CodegenProperty{openApiType='User', baseName='SchemaForRequestBodyApplicationJson', complexType='User', getter='getSchemaForRequestBodyApplicationJson', setter='setSchemaForRequestBodyApplicationJson', description='null', dataType='User', datatypeWithEnum='User', dataFormat='null', name='SchemaForRequestBodyApplicationJson', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.SchemaForRequestBodyApplicationJson;', baseType='User', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"$ref" : "#/components/schemas/User"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=true, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='SchemaForRequestBodyApplicationJson', nameInSnakeCase='SCHEMA_FOR_REQUEST_BODY_APPLICATION_JSON', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='User', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=#/components/schemas/User, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=CodegenProperty{openApiType='User', baseName='SchemaForRequestBodyApplicationJson', complexType='User', getter='getSchemaForRequestBodyApplicationJson', setter='setSchemaForRequestBodyApplicationJson', description='null', dataType='User', datatypeWithEnum='User', dataFormat='null', name='SchemaForRequestBodyApplicationJson', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.SchemaForRequestBodyApplicationJson;', baseType='User', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"$ref" : "#/components/schemas/User"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=true, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='SchemaForRequestBodyApplicationJson', nameInSnakeCase='SCHEMA_FOR_REQUEST_BODY_APPLICATION_JSON', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='User', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=#/components/schemas/User, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='SchemaForRequestBodyApplicationJson', nameInSnakeCase='SCHEMA_FOR_REQUEST_BODY_APPLICATION_JSON', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, encoding=null, vendorExtensions={}}}
### Delete user
## This can only be done by the logged in user.
# @name deleteUser
DELETE http://petstore.swagger.io/v2/user/{{username}}
### Get user by user name
##
# @name getUserByName
GET http://petstore.swagger.io/v2/user/{{username}}
### Logs user into the system
##
# @name loginUser
GET http://petstore.swagger.io/v2/user/login
### Logs out current logged in user session
##
# @name logoutUser
GET http://petstore.swagger.io/v2/user/logout
### Updated user
## This can only be done by the logged in user.
# @name updateUser
PUT http://petstore.swagger.io/v2/user/{{username}}
Content-Type: application/json
{application/json=CodegenMediaType{schema=CodegenProperty{openApiType='User', baseName='SchemaForRequestBodyApplicationJson', complexType='User', getter='getSchemaForRequestBodyApplicationJson', setter='setSchemaForRequestBodyApplicationJson', description='null', dataType='User', datatypeWithEnum='User', dataFormat='null', name='SchemaForRequestBodyApplicationJson', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.SchemaForRequestBodyApplicationJson;', baseType='User', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"$ref" : "#/components/schemas/User"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=true, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='SchemaForRequestBodyApplicationJson', nameInSnakeCase='SCHEMA_FOR_REQUEST_BODY_APPLICATION_JSON', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='User', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=#/components/schemas/User, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, encoding=null, vendorExtensions={}}}

View File

@@ -0,0 +1,39 @@
# OpenAPI Petstore - Jetbrains API Client
## OpenAPI File description
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* API basepath : [http://petstore.swagger.io/v2](http://petstore.swagger.io/v2)
* Version : 1.0.0
## Documentation for API Endpoints
All URIs are relative to *http://petstore.swagger.io/v2*, but will link to the `.http` file that contains the endpoint definition
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*PetApi* | [**addPet**](Apis/PetApi.http#addpet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**deletePet**](Apis/PetApi.http#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**findPetsByStatus**](Apis/PetApi.http#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
*PetApi* | [**findPetsByTags**](Apis/PetApi.http#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
*PetApi* | [**getPetById**](Apis/PetApi.http#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
*PetApi* | [**updatePet**](Apis/PetApi.http#updatepet) | **PUT** /pet | Update an existing pet
*PetApi* | [**updatePetWithForm**](Apis/PetApi.http#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**uploadFile**](Apis/PetApi.http#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
*StoreApi* | [**deleteOrder**](Apis/StoreApi.http#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*StoreApi* | [**getInventory**](Apis/StoreApi.http#getinventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApi* | [**getOrderById**](Apis/StoreApi.http#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID
*StoreApi* | [**placeOrder**](Apis/StoreApi.http#placeorder) | **POST** /store/order | Place an order for a pet
*UserApi* | [**createUser**](Apis/UserApi.http#createuser) | **POST** /user | Create user
*UserApi* | [**createUsersWithArrayInput**](Apis/UserApi.http#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array
*UserApi* | [**createUsersWithListInput**](Apis/UserApi.http#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array
*UserApi* | [**deleteUser**](Apis/UserApi.http#deleteuser) | **DELETE** /user/{username} | Delete user
*UserApi* | [**getUserByName**](Apis/UserApi.http#getuserbyname) | **GET** /user/{username} | Get user by user name
*UserApi* | [**loginUser**](Apis/UserApi.http#loginuser) | **GET** /user/login | Logs user into the system
*UserApi* | [**logoutUser**](Apis/UserApi.http#logoutuser) | **GET** /user/logout | Logs out current logged in user session
*UserApi* | [**updateUser**](Apis/UserApi.http#updateuser) | **PUT** /user/{username} | Updated user
_This client was generated by the jetbrains-http-client of OpenAPI Generator_

View File

@@ -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

View File

@@ -0,0 +1,2 @@
Apis/PaymentsApi.sh
README.md

View File

@@ -0,0 +1 @@
7.4.0-SNAPSHOT

View File

@@ -0,0 +1,30 @@
#!/bin/sh
## PaymentsApi
### Get payment method by id
# getPaymentMethodById
curl -X GET https://checkout-test.adyen.com/v71/paymentMethods/{id} \
-H "x-API-key: YOUR_API_KEY"
### Get payment methods
# getPaymentMethods
curl -X GET https://checkout-test.adyen.com/v71/paymentMethods \
-H "x-API-key: YOUR_API_KEY"
### Make a payment
# postMakePayment
curl -X POST https://checkout-test.adyen.com/v71/payments \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"

View File

@@ -0,0 +1,75 @@
#!/bin/sh
## PetApi
### Add a new pet to the store
# addPet
curl -X POST http://petstore.swagger.io/v2/pet \
-H 'Content-Type: application/json' \ -H 'Content-Type: application/xml' \
-H 'Accept: application/json' \ -H 'Accept: application/xml' \
-H "x-API-key: YOUR_API_KEY"
### Deletes a pet
# deletePet
curl -X DELETE http://petstore.swagger.io/v2/pet/{petId} \
-H "x-API-key: YOUR_API_KEY"
### Finds Pets by status
# findPetsByStatus
curl -X GET http://petstore.swagger.io/v2/pet/findByStatus \
-H "x-API-key: YOUR_API_KEY"
### Finds Pets by tags
# findPetsByTags
curl -X GET http://petstore.swagger.io/v2/pet/findByTags \
-H "x-API-key: YOUR_API_KEY"
### Find pet by ID
# getPetById
curl -X GET http://petstore.swagger.io/v2/pet/{petId} \
-H "x-API-key: YOUR_API_KEY"
### Update an existing pet
# updatePet
curl -X PUT http://petstore.swagger.io/v2/pet \
-H 'Content-Type: application/json' \ -H 'Content-Type: application/xml' \
-H 'Accept: application/json' \ -H 'Accept: application/xml' \
-H "x-API-key: YOUR_API_KEY"
### Updates a pet in the store with form data
# updatePetWithForm
curl -X POST http://petstore.swagger.io/v2/pet/{petId} \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/x-www-form-urlencoded' \
-H "x-API-key: YOUR_API_KEY"
### uploads an image
# uploadFile
curl -X POST http://petstore.swagger.io/v2/pet/{petId}/uploadImage \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: multipart/form-data' \
-H "x-API-key: YOUR_API_KEY"

View File

@@ -0,0 +1,39 @@
#!/bin/sh
## StoreApi
### Delete purchase order by ID
# deleteOrder
curl -X DELETE http://petstore.swagger.io/v2/store/order/{orderId} \
-H "x-API-key: YOUR_API_KEY"
### Returns pet inventories by status
# getInventory
curl -X GET http://petstore.swagger.io/v2/store/inventory \
-H "x-API-key: YOUR_API_KEY"
### Find purchase order by ID
# getOrderById
curl -X GET http://petstore.swagger.io/v2/store/order/{orderId} \
-H "x-API-key: YOUR_API_KEY"
### Place an order for a pet
# placeOrder
curl -X POST http://petstore.swagger.io/v2/store/order \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"

View File

@@ -0,0 +1,75 @@
#!/bin/sh
## UserApi
### Create user
# createUser
curl -X POST http://petstore.swagger.io/v2/user \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Creates list of users with given input array
# createUsersWithArrayInput
curl -X POST http://petstore.swagger.io/v2/user/createWithArray \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Creates list of users with given input array
# createUsersWithListInput
curl -X POST http://petstore.swagger.io/v2/user/createWithList \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"
### Delete user
# deleteUser
curl -X DELETE http://petstore.swagger.io/v2/user/{username} \
-H "x-API-key: YOUR_API_KEY"
### Get user by user name
# getUserByName
curl -X GET http://petstore.swagger.io/v2/user/{username} \
-H "x-API-key: YOUR_API_KEY"
### Logs user into the system
# loginUser
curl -X GET http://petstore.swagger.io/v2/user/login \
-H "x-API-key: YOUR_API_KEY"
### Logs out current logged in user session
# logoutUser
curl -X GET http://petstore.swagger.io/v2/user/logout \
-H "x-API-key: YOUR_API_KEY"
### Updated user
# updateUser
curl -X PUT http://petstore.swagger.io/v2/user/{username} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "x-API-key: YOUR_API_KEY"

View File

View File

@@ -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

View File

@@ -0,0 +1,2 @@
.openapi-generator-ignore
postman.json

View File

@@ -0,0 +1 @@
unset

View File

@@ -0,0 +1,75 @@
{
"info": {
"name": "Basic",
"description": {
"content": "Sample API",
"type": "text/markdown"
},
"version": "1.0",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "basic",
"item": [
{
"name": "/users/:userId",
"description": "Get User Info by User ID",
"item": [
{
"name": "Get User",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"disabled": false
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/users/:userId",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId"
],
"variable": [
{
"key": "userId",
"value": "",
"description": "Unique identifier of the user"
}
],
"query": [
]
},
"description": "Get User Info by User ID"
}
}
]
}
]
}
],
"variable": [
{
"key": "baseUrl",
"value": "http://localhost:5001",
"type": "string"
}
]
}