Closed dangnhdev closed 7 months ago
I've identified the issue. It's because Etsy schema has the Self object which cannot be used as a class name in PHP.
"/v3/application/users/me": {
"get": {
"operationId": "getMe",
"tags": ["User"],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Self"
}
}
}
},
"Self": {
"type": "object",
"description": "Represents a single user of the site",
"properties": {
"user_id": {
"type": "integer",
"description": "The numeric ID of a user. This number is also a valid shop ID for the user\\'s shop.",
"minimum": 1
},
"shop_id": {
"type": "integer",
"description": "The unique positive non-zero numeric ID for an Etsy Shop.",
"minimum": 1
}
}
}
Anw, I tried to use openapi-generator and found the option --skip-validate-spec option useful as it generates all the files, which help me detect this problem.
Perhaps we should also consider enabling users to bypass schema validation?
Etsy OpenAPI: https://www.etsy.com/openapi/generated/oas/3.0.0.json
Command I use:
Version 1.1 of the package can generate successfully, whereas version 1.2 throws an error.