Skip to content

Commit

Permalink
Merge pull request #14 from lukaszwit/regenerated-api-client
Browse files Browse the repository at this point in the history
Regenerated api client
  • Loading branch information
lukaszwit authored Oct 28, 2019
2 parents 6991521 + 709c5fe commit 3522ce5
Show file tree
Hide file tree
Showing 450 changed files with 102,270 additions and 13,905 deletions.
55 changes: 0 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,58 +127,3 @@ openapitools/openapi-generator-cli generate \
--api-package Client \
--model-package Model
```

## TODO

For the moment swagger.yaml is taken from allegro:

https://developer.allegro.pl/swagger.yaml

but we met issues with discriminator for definition CategoryParameterList when we generate classes using [OpenAPI Generator](https://openapi-generator.tech).

Therefore we replaced original allegro definition for CategoryParameterList:

```
CategoryParameterList:
type: object
properties:
parameters:
type: array
items:
discriminator:
propertyName: type
mapping:
INTEGER: '#/components/schemas/IntegerCategoryParameter'
FLOAT: '#/components/schemas/FloatCategoryParameter'
STRING: '#/components/schemas/StringCategoryParameter'
DICTIONARY: '#/components/schemas/DictionaryCategoryParameter'
oneOf:
- $ref: '#/components/schemas/IntegerCategoryParameter'
- $ref: '#/components/schemas/FloatCategoryParameter'
- $ref: '#/components/schemas/StringCategoryParameter'
- $ref: '#/components/schemas/DictionaryCategoryParameter'
```

and CategoryParameter:

```
CategoryParameter:
properties:
id:
type: string
name:
type: string
type:
type: string
example: 'INTEGER, FLOAT, STRING, DICTIONARY'
required:
type: boolean
unit:
type: string
options:
$ref: '#/components/schemas/CategoryParameterOptions'
```

In the future we can try to use this fork to generate schema without our changes in swagger.yml

https://github.com/netfarma/openapi-generator/commit/8ac80203ec557a7198e48adc66e9c1961c4cd6ce
4 changes: 2 additions & 2 deletions src/ApiException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
*
* https://developer.allegro.pl/about
*
* OpenAPI spec version: 1.0
* OpenAPI spec version: latest
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 4.0.0-SNAPSHOT
*/

/**
Expand Down
Loading

0 comments on commit 3522ce5

Please sign in to comment.