We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swagger_parser:
output_directory: lib/api squash_clients: true
schemes:
- schema_url: https://api.example/schema/ name: pet_service_dart_mappable json_serializer: freezed client_postfix: Service put_clients_in_folder: true put_in_folder: true
Models generated
Models not generating
{ "openapi": "3.1.0", "info": { "title": "Relationship APP API", "version": "1.0.0", "description": "Swagger UI for Relationship APP API" }, "paths": { "/auth/token/": { "post": { "operationId": "auth_token_create", "description": "Takes a set of user credentials and returns an access and refresh JSON web\ntoken pair to prove the authentication of those credentials.", "tags": [ "auth" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenObtainPair" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/TokenObtainPair" } }, "multipart/form-data": { "schema": { "$ref": "#/components/schemas/TokenObtainPair" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenObtainPair" } } }, "description": "" } } } }, "/auth/token/refresh/": { "post": { "operationId": "auth_token_refresh_create", "description": "Takes a refresh type JSON web token and returns an access type JSON web\ntoken if the refresh token is valid.", "tags": [ "auth" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenRefresh" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/TokenRefresh" } }, "multipart/form-data": { "schema": { "$ref": "#/components/schemas/TokenRefresh" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenRefresh" } } }, "description": "" } } } }, "/schema/": { "get": { "operationId": "schema_retrieve", "description": "OpenApi3 schema for this API. Format can be selected via content negotiation.\n\n- YAML: application/vnd.oai.openapi\n- JSON: application/vnd.oai.openapi+json", "tags": [ "schema" ], "security": [ { "jwtAuth": [] }, {} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "additionalProperties": {} } } }, "description": "" } } } }, "/users/": { "get": { "operationId": "users_list", "tags": [ "users" ], "security": [ { "jwtAuth": [] } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/User" } } } }, "description": "" } } }, "post": { "operationId": "users_create", "tags": [ "users" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/User" } }, "multipart/form-data": { "schema": { "$ref": "#/components/schemas/User" } } }, "required": true }, "security": [ { "jwtAuth": [] }, {} ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } }, "description": "" } } } }, "/users/{id}/": { "get": { "operationId": "users_retrieve", "parameters": [ { "in": "path", "name": "id", "schema": { "type": "integer" }, "description": "A unique integer value identifying this user.", "required": true } ], "tags": [ "users" ], "security": [ { "jwtAuth": [] } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } }, "description": "" } } }, "put": { "operationId": "users_update", "parameters": [ { "in": "path", "name": "id", "schema": { "type": "integer" }, "description": "A unique integer value identifying this user.", "required": true } ], "tags": [ "users" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/User" } }, "multipart/form-data": { "schema": { "$ref": "#/components/schemas/User" } } }, "required": true }, "security": [ { "jwtAuth": [] } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } }, "description": "" } } }, "patch": { "operationId": "users_partial_update", "parameters": [ { "in": "path", "name": "id", "schema": { "type": "integer" }, "description": "A unique integer value identifying this user.", "required": true } ], "tags": [ "users" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatchedUser" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/PatchedUser" } }, "multipart/form-data": { "schema": { "$ref": "#/components/schemas/PatchedUser" } } } }, "security": [ { "jwtAuth": [] } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } }, "description": "" } } }, "delete": { "operationId": "users_destroy", "parameters": [ { "in": "path", "name": "id", "schema": { "type": "integer" }, "description": "A unique integer value identifying this user.", "required": true } ], "tags": [ "users" ], "security": [ { "jwtAuth": [] } ], "responses": { "204": { "description": "No response body" } } } } }, "components": { "schemas": { "PatchedUser": { "type": "object", "properties": { "id": { "type": "integer", "readOnly": true }, "email": { "type": "string", "format": "email", "title": "Email address", "maxLength": 254 }, "first_name": { "type": "string", "maxLength": 150 }, "last_name": { "type": "string", "maxLength": 150 }, "is_active": { "type": "boolean", "title": "Active", "description": "Designates whether this user should be treated as active. Unselect this instead of deleting accounts." }, "date_joined": { "type": "string", "format": "date-time", "readOnly": true }, "password": { "type": "string", "writeOnly": true } } }, "TokenObtainPair": { "type": "object", "properties": { "email": { "type": "string", "writeOnly": true }, "password": { "type": "string", "writeOnly": true }, "access": { "type": "string", "readOnly": true }, "refresh": { "type": "string", "readOnly": true } }, "required": [ "access", "email", "password", "refresh" ] }, "TokenRefresh": { "type": "object", "properties": { "access": { "type": "string", "readOnly": true }, "refresh": { "type": "string" } }, "required": [ "access", "refresh" ] }, "User": { "type": "object", "properties": { "id": { "type": "integer", "readOnly": true }, "email": { "type": "string", "format": "email", "title": "Email address", "maxLength": 254 }, "first_name": { "type": "string", "maxLength": 150 }, "last_name": { "type": "string", "maxLength": 150 }, "is_active": { "type": "boolean", "title": "Active", "description": "Designates whether this user should be treated as active. Unselect this instead of deleting accounts." }, "date_joined": { "type": "string", "format": "date-time", "readOnly": true }, "password": { "type": "string", "writeOnly": true } }, "required": [ "date_joined", "email", "id", "password" ] } }, "securitySchemes": { "jwtAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } } }
[Paste your code here]
[Paste your logs here]
Dart 3.6.0 • DevTools 2.40.2
Flutter 3.27.1 • channel stable
The text was updated successfully, but these errors were encountered:
Can anyone help me?
Sorry, something went wrong.
No branches or pull requests
Steps to reproduce
swagger_parser:
<...> Set default parameters for all schemes.
output_directory: lib/api
squash_clients: true
Optional. You can pass a list of schemes.
Each schema inherits the parameters described in swagger_parser,
any parameter for any schema can be set manually.
Cannot be used at the same time as schema_path.
schemes:
Expected results
Models generated
Actual results
Models not generating
Your OpenApi snippet
{
"openapi": "3.1.0",
"info": {
"title": "Relationship APP API",
"version": "1.0.0",
"description": "Swagger UI for Relationship APP API"
},
"paths": {
"/auth/token/": {
"post": {
"operationId": "auth_token_create",
"description": "Takes a set of user credentials and returns an access and refresh JSON web\ntoken pair to prove the authentication of those credentials.",
"tags": [
"auth"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TokenObtainPair"
}
},
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/TokenObtainPair"
}
},
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/TokenObtainPair"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TokenObtainPair"
}
}
},
"description": ""
}
}
}
},
"/auth/token/refresh/": {
"post": {
"operationId": "auth_token_refresh_create",
"description": "Takes a refresh type JSON web token and returns an access type JSON web\ntoken if the refresh token is valid.",
"tags": [
"auth"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TokenRefresh"
}
},
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/TokenRefresh"
}
},
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/TokenRefresh"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TokenRefresh"
}
}
},
"description": ""
}
}
}
},
"/schema/": {
"get": {
"operationId": "schema_retrieve",
"description": "OpenApi3 schema for this API. Format can be selected via content negotiation.\n\n- YAML: application/vnd.oai.openapi\n- JSON: application/vnd.oai.openapi+json",
"tags": [
"schema"
],
"security": [
{
"jwtAuth": []
},
{}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {}
}
}
},
"description": ""
}
}
}
},
"/users/": {
"get": {
"operationId": "users_list",
"tags": [
"users"
],
"security": [
{
"jwtAuth": []
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/User"
}
}
}
},
"description": ""
}
}
},
"post": {
"operationId": "users_create",
"tags": [
"users"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
},
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/User"
}
},
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
},
"required": true
},
"security": [
{
"jwtAuth": []
},
{}
],
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
},
"description": ""
}
}
}
},
"/users/{id}/": {
"get": {
"operationId": "users_retrieve",
"parameters": [
{
"in": "path",
"name": "id",
"schema": {
"type": "integer"
},
"description": "A unique integer value identifying this user.",
"required": true
}
],
"tags": [
"users"
],
"security": [
{
"jwtAuth": []
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
},
"description": ""
}
}
},
"put": {
"operationId": "users_update",
"parameters": [
{
"in": "path",
"name": "id",
"schema": {
"type": "integer"
},
"description": "A unique integer value identifying this user.",
"required": true
}
],
"tags": [
"users"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
},
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/User"
}
},
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
},
"required": true
},
"security": [
{
"jwtAuth": []
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
},
"description": ""
}
}
},
"patch": {
"operationId": "users_partial_update",
"parameters": [
{
"in": "path",
"name": "id",
"schema": {
"type": "integer"
},
"description": "A unique integer value identifying this user.",
"required": true
}
],
"tags": [
"users"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PatchedUser"
}
},
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/PatchedUser"
}
},
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/PatchedUser"
}
}
}
},
"security": [
{
"jwtAuth": []
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
},
"description": ""
}
}
},
"delete": {
"operationId": "users_destroy",
"parameters": [
{
"in": "path",
"name": "id",
"schema": {
"type": "integer"
},
"description": "A unique integer value identifying this user.",
"required": true
}
],
"tags": [
"users"
],
"security": [
{
"jwtAuth": []
}
],
"responses": {
"204": {
"description": "No response body"
}
}
}
}
},
"components": {
"schemas": {
"PatchedUser": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"email": {
"type": "string",
"format": "email",
"title": "Email address",
"maxLength": 254
},
"first_name": {
"type": "string",
"maxLength": 150
},
"last_name": {
"type": "string",
"maxLength": 150
},
"is_active": {
"type": "boolean",
"title": "Active",
"description": "Designates whether this user should be treated as active. Unselect this instead of deleting accounts."
},
"date_joined": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"password": {
"type": "string",
"writeOnly": true
}
}
},
"TokenObtainPair": {
"type": "object",
"properties": {
"email": {
"type": "string",
"writeOnly": true
},
"password": {
"type": "string",
"writeOnly": true
},
"access": {
"type": "string",
"readOnly": true
},
"refresh": {
"type": "string",
"readOnly": true
}
},
"required": [
"access",
"email",
"password",
"refresh"
]
},
"TokenRefresh": {
"type": "object",
"properties": {
"access": {
"type": "string",
"readOnly": true
},
"refresh": {
"type": "string"
}
},
"required": [
"access",
"refresh"
]
},
"User": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"email": {
"type": "string",
"format": "email",
"title": "Email address",
"maxLength": 254
},
"first_name": {
"type": "string",
"maxLength": 150
},
"last_name": {
"type": "string",
"maxLength": 150
},
"is_active": {
"type": "boolean",
"title": "Active",
"description": "Designates whether this user should be treated as active. Unselect this instead of deleting accounts."
},
"date_joined": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"password": {
"type": "string",
"writeOnly": true
}
},
"required": [
"date_joined",
"email",
"id",
"password"
]
}
},
"securitySchemes": {
"jwtAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}
}
}
}
Code sample
Code sample
[Paste your code here]
Logs
Logs
[Paste your logs here]
Dart version and used packages versions
Dart version
Dart 3.6.0 • DevTools 2.40.2
Packages version
Flutter 3.27.1 • channel stable
The text was updated successfully, but these errors were encountered: