Skip to content

Commit

Permalink
Merge pull request #93 from ogen-go/fix/gen-fix-call-issue-92
Browse files Browse the repository at this point in the history
fix(gen): correctly call root handlers of variable ones
  • Loading branch information
ernado authored Dec 22, 2021
2 parents 5b4c761 + d9928d8 commit fef213d
Show file tree
Hide file tree
Showing 41 changed files with 12,380 additions and 1 deletion.
1,382 changes: 1,382 additions & 0 deletions _testdata/ent.json

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions _testdata/ex_route_params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"openapi": "3.0.3",
"info": {
"title": "Route params",
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "0.1.1"
},
"paths": {
"/name": {
"get": {
"description": "Retrieve any data",
"operationId": "dataGetAny",
"responses": {
"200": {
"description": "Data",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/name/{id}": {
"get": {
"description": "Retrieve data",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"minimum": 1,
"type": "integer"
}
}
],
"operationId": "dataGetID",
"responses": {
"200": {
"description": "Data",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/name/{id}/{key}": {
"get": {
"description": "Retrieve data",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"minimum": 1,
"type": "integer"
}
},
{
"name": "key",
"in": "path",
"required": true,
"schema": {
"minimum": 1,
"type": "string"
}
}
],
"operationId": "dataGet",
"responses": {
"200": {
"description": "Data",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion _testdata/manga.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"operationId": "search",
"parameters": [
{
"description": "Search query.\n* You can search for multiple terms at the same time, and this will return only galleries that contain both terms. For example, rust cox finds all galleries that contain both rust and cox.\n* You can exclude terms by prefixing them with -. For example, rust cox -tokio matches all galleries matching rust and cox but not tokio.\n* Exact searches can be performed by wrapping terms in double quotes. For example, \"big dogs\" only matches galleries with \"big dogs\" somewhere in the title or in tags.\n* These can be combined with tag namespaces for finer control over the query: parodies:railgun -tag:\"big dogs\". ",
"name": "query",
"in": "query",
"description": "Search query.\n* You can search for multiple terms at the same time, and this will return only galleries that contain both terms. For example, anal tanlines finds all galleries that contain both anal and tanlines.\n* You can exclude terms by prefixing them with -. For example, anal tanlines -yaoi matches all galleries matching anal and tanlines but not yaoi.\n* Exact searches can be performed by wrapping terms in double quotes. For example, \"big dogs\" only matches galleries with \"big breasts\" somewhere in the title or in tags.\n* These can be combined with tag namespaces for finer control over the query: parodies:railgun -tag:\"big dogs\". ",
"required": true,
"schema": {
"type": "string"
Expand Down
136 changes: 136 additions & 0 deletions examples/ex_ent/oas_cfg_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fef213d

Please sign in to comment.