@@ -83,20 +83,26 @@ Please follow the [installation](#installation) instruction and execute the foll
8383import org.openapitools.client.ApiClient ;
8484import org.openapitools.client.ApiException ;
8585import org.openapitools.client.Configuration ;
86+ import org.openapitools.client.auth.* ;
8687import org.openapitools.client.model.* ;
87- import org.openapitools.client.api.FakeApi ;
88+ import org.openapitools.client.api.PetApi ;
8889
8990public class Example {
9091 public static void main (String [] args ) {
9192 ApiClient defaultClient = Configuration . getDefaultApiClient();
9293 defaultClient. setBasePath(" http://petstore.swagger.io/v2" );
94+
95+ // Configure OAuth2 access token for authorization: petstore_auth
96+ OAuth petstore_auth = (OAuth ) defaultClient. getAuthentication(" petstore_auth" );
97+ petstore_auth. setAccessToken(" YOUR ACCESS TOKEN" );
9398
94- FakeApi apiInstance = new FakeApi (defaultClient);
99+ PetApi apiInstance = new PetApi (defaultClient);
100+ Pet pet = new Pet (); // Pet | Pet object that needs to be added to the store
95101 try {
96- Object result = apiInstance. fakeInlineSchemaAnyofPath1Get( );
102+ Pet result = apiInstance. addPet(pet );
97103 System . out. println(result);
98104 } catch (ApiException e) {
99- System . err. println(" Exception when calling FakeApi#fakeInlineSchemaAnyofPath1Get " );
105+ System . err. println(" Exception when calling PetApi#addPet " );
100106 System . err. println(" Status code: " + e. getCode());
101107 System . err. println(" Reason: " + e. getResponseBody());
102108 System . err. println(" Response headers: " + e. getResponseHeaders());
@@ -113,18 +119,6 @@ All URIs are relative to *http://petstore.swagger.io/v2*
113119
114120Class | Method | HTTP request | Description
115121------------ | ------------- | ------------- | -------------
116- * FakeApi* | [ ** fakeInlineSchemaAnyofPath1Get** ] ( docs/FakeApi.md#fakeInlineSchemaAnyofPath1Get ) | ** GET** /fake/inline/schema/anyof/path1 |
117- * FakeApi* | [ ** fakeInlineSchemaAnyofPath2Get** ] ( docs/FakeApi.md#fakeInlineSchemaAnyofPath2Get ) | ** GET** /fake/inline/schema/anyof/path2 |
118- * FakeApi* | [ ** fakeInlineSchemaAnyofPath3Get** ] ( docs/FakeApi.md#fakeInlineSchemaAnyofPath3Get ) | ** GET** /fake/inline/schema/anyof/path3 |
119- * FakeApi* | [ ** op1** ] ( docs/FakeApi.md#op1 ) | ** POST** /fake/api/changeowner | op1
120- * FakeApi* | [ ** op2** ] ( docs/FakeApi.md#op2 ) | ** POST** /fake/api/changename | op2
121- * FakeApi* | [ ** op3** ] ( docs/FakeApi.md#op3 ) | ** POST** /fake/api/query/enum | op3
122- * FakeApi* | [ ** refToRefParameter** ] ( docs/FakeApi.md#refToRefParameter ) | ** GET** /ref/ref_to_parameter |
123- * FakeApi* | [ ** refToRefParameterAnyof** ] ( docs/FakeApi.md#refToRefParameterAnyof ) | ** GET** /ref/ref_to_operation_level_parameter_oneof |
124- * FakeApi* | [ ** refToRefParameterOneof** ] ( docs/FakeApi.md#refToRefParameterOneof ) | ** GET** /ref/ref_to_path_level_parameter_oneof |
125- * FakeApi* | [ ** responseNoRef** ] ( docs/FakeApi.md#responseNoRef ) | ** GET** /no_ref |
126- * FakeApi* | [ ** responseRefToNoRef** ] ( docs/FakeApi.md#responseRefToNoRef ) | ** GET** /ref/no_ref |
127- * FakeApi* | [ ** responseRefToRef** ] ( docs/FakeApi.md#responseRefToRef ) | ** GET** /ref/ref |
128122* PetApi* | [ ** addPet** ] ( docs/PetApi.md#addPet ) | ** POST** /pet | Add a new pet to the store
129123* PetApi* | [ ** deletePet** ] ( docs/PetApi.md#deletePet ) | ** DELETE** /pet/{petId} | Deletes a pet
130124* PetApi* | [ ** findPetsByStatus** ] ( docs/PetApi.md#findPetsByStatus ) | ** GET** /pet/findByStatus | Finds Pets by status
@@ -149,31 +143,10 @@ Class | Method | HTTP request | Description
149143
150144## Documentation for Models
151145
152- - [ AllOfSimpleModel] ( docs/AllOfSimpleModel.md )
153- - [ Animal] ( docs/Animal.md )
154- - [ AnyTypeTest] ( docs/AnyTypeTest.md )
155- - [ ArrayOfSameRef] ( docs/ArrayOfSameRef.md )
156- - [ Cat] ( docs/Cat.md )
157146 - [ Category] ( docs/Category.md )
158- - [ CircularReference1] ( docs/CircularReference1.md )
159- - [ CircularReference2] ( docs/CircularReference2.md )
160- - [ CircularReference3] ( docs/CircularReference3.md )
161- - [ CodesEnum] ( docs/CodesEnum.md )
162- - [ Dog] ( docs/Dog.md )
163- - [ FakeWebhooksSourcesDeletedPostRequest] ( docs/FakeWebhooksSourcesDeletedPostRequest.md )
164- - [ FakeWebhooksSourcesDeletedPostRequestEvent] ( docs/FakeWebhooksSourcesDeletedPostRequestEvent.md )
165147 - [ ModelApiResponse] ( docs/ModelApiResponse.md )
166- - [ OneOfStringOrInt] ( docs/OneOfStringOrInt.md )
167148 - [ Order] ( docs/Order.md )
168149 - [ Pet] ( docs/Pet.md )
169- - [ PetWithTypesObjectNullAndRef] ( docs/PetWithTypesObjectNullAndRef.md )
170- - [ RefRefToPathLevelParameterOneofRefToOneofParameter] ( docs/RefRefToPathLevelParameterOneofRefToOneofParameter.md )
171- - [ RefToRefParameterAnyofRefToAnyofParameter] ( docs/RefToRefParameterAnyofRefToAnyofParameter.md )
172- - [ SelfReferenceAdditionalProperties] ( docs/SelfReferenceAdditionalProperties.md )
173- - [ SelfReferenceAnyOf] ( docs/SelfReferenceAnyOf.md )
174- - [ SelfReferenceOneOf] ( docs/SelfReferenceOneOf.md )
175- - [ SimpleModelWithArrayProperty] ( docs/SimpleModelWithArrayProperty.md )
176- - [ StringOrInt] ( docs/StringOrInt.md )
177150 - [ Tag] ( docs/Tag.md )
178151 - [ User] ( docs/User.md )
179152
0 commit comments