Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
27pchrisl committed Mar 23, 2024
1 parent 8089f1e commit 0436f25
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 47 deletions.
5 changes: 2 additions & 3 deletions src/PathSegment/OpenAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -826,15 +826,14 @@ protected function generateQueryRoutes(
$pathItemObject->{'get'} = $queryObject;
$annotations = $entitySet->getAnnotations();

$tags = [
$entitySet->getName(),
];
$tags = [];

if ($relatedSet) {
$queryObject->summary = __('lodata::Get entities from related :name', ['name' => $entitySet->getName()]);
$tags[] = $relatedSet->getName();
} else {
$queryObject->summary = __('lodata::Get entities from :name', ['name' => $entitySet->getName()]);
$tags[] = $entitySet->getName();
}

$queryObject->tags = $this->uniqueTags($tags);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@
"get": {
"summary": "Get entities from related Flights",
"tags": [
"Flights",
"Airports"
],
"parameters": [
Expand Down Expand Up @@ -508,7 +507,6 @@
"get": {
"summary": "Get entities from related Countries",
"tags": [
"Countries",
"Airports"
],
"parameters": [
Expand Down Expand Up @@ -944,7 +942,6 @@
"get": {
"summary": "Get entities from related Passengers",
"tags": [
"Passengers",
"Flights"
],
"parameters": [
Expand Down Expand Up @@ -1133,7 +1130,6 @@
"get": {
"summary": "Get entities from related Airports",
"tags": [
"Airports",
"Flights"
],
"parameters": [
Expand Down Expand Up @@ -1312,7 +1308,6 @@
"get": {
"summary": "Get entities from related Airports",
"tags": [
"Airports",
"Flights"
],
"parameters": [
Expand Down Expand Up @@ -1754,7 +1749,6 @@
"get": {
"summary": "Get entities from related Airports",
"tags": [
"Airports",
"Countries"
],
"parameters": [
Expand Down Expand Up @@ -2243,7 +2237,6 @@
"get": {
"summary": "Get entities from related Pets",
"tags": [
"Pets",
"Passengers"
],
"parameters": [
Expand Down Expand Up @@ -2406,7 +2399,6 @@
"get": {
"summary": "Get entities from related Flights",
"tags": [
"Flights",
"Passengers"
],
"parameters": [
Expand Down Expand Up @@ -2574,7 +2566,6 @@
"get": {
"summary": "Get entities from related Airports",
"tags": [
"Airports",
"Passengers"
],
"parameters": [
Expand Down Expand Up @@ -2753,7 +2744,6 @@
"get": {
"summary": "Get entities from related Airports",
"tags": [
"Airports",
"Passengers"
],
"parameters": [
Expand Down Expand Up @@ -3203,7 +3193,6 @@
"get": {
"summary": "Get entities from related Passengers",
"tags": [
"Passengers",
"Pets"
],
"parameters": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@
"get": {
"summary": "Get entities from related flights",
"tags": [
"flights",
"passengers"
],
"parameters": [
Expand Down Expand Up @@ -522,7 +521,6 @@
"get": {
"summary": "Get entities from related pets",
"tags": [
"pets",
"passengers"
],
"parameters": [
Expand Down Expand Up @@ -950,7 +948,6 @@
"get": {
"summary": "Get entities from related airports",
"tags": [
"airports",
"flights"
],
"parameters": [
Expand Down Expand Up @@ -1129,7 +1126,6 @@
"get": {
"summary": "Get entities from related airports",
"tags": [
"airports",
"flights"
],
"parameters": [
Expand Down Expand Up @@ -1308,7 +1304,6 @@
"get": {
"summary": "Get entities from related airports",
"tags": [
"airports",
"flights"
],
"parameters": [
Expand Down Expand Up @@ -1487,7 +1482,6 @@
"get": {
"summary": "Get entities from related passengers",
"tags": [
"passengers",
"flights"
],
"parameters": [
Expand Down Expand Up @@ -1967,7 +1961,6 @@
"get": {
"summary": "Get entities from related countries",
"tags": [
"countries",
"airports"
],
"parameters": [
Expand Down Expand Up @@ -2108,7 +2101,6 @@
"get": {
"summary": "Get entities from related flights",
"tags": [
"flights",
"airports"
],
"parameters": [
Expand Down
11 changes: 0 additions & 11 deletions tests/__snapshots__/EntitySet/EloquentTest__test_metadata__4.json
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@
"get": {
"summary": "Get entities from related Flights",
"tags": [
"Flights",
"Airports"
],
"parameters": [
Expand Down Expand Up @@ -508,7 +507,6 @@
"get": {
"summary": "Get entities from related Countries",
"tags": [
"Countries",
"Airports"
],
"parameters": [
Expand Down Expand Up @@ -944,7 +942,6 @@
"get": {
"summary": "Get entities from related Passengers",
"tags": [
"Passengers",
"Flights"
],
"parameters": [
Expand Down Expand Up @@ -1132,7 +1129,6 @@
"get": {
"summary": "Get entities from related Airports",
"tags": [
"Airports",
"Flights"
],
"parameters": [
Expand Down Expand Up @@ -1311,7 +1307,6 @@
"get": {
"summary": "Get entities from related Airports",
"tags": [
"Airports",
"Flights"
],
"parameters": [
Expand Down Expand Up @@ -1753,7 +1748,6 @@
"get": {
"summary": "Get entities from related Airports",
"tags": [
"Airports",
"Countries"
],
"parameters": [
Expand Down Expand Up @@ -2240,7 +2234,6 @@
"get": {
"summary": "Get entities from related Pets",
"tags": [
"Pets",
"Passengers"
],
"parameters": [
Expand Down Expand Up @@ -2403,7 +2396,6 @@
"get": {
"summary": "Get entities from related Flights",
"tags": [
"Flights",
"Passengers"
],
"parameters": [
Expand Down Expand Up @@ -2571,7 +2563,6 @@
"get": {
"summary": "Get entities from related Airports",
"tags": [
"Airports",
"Passengers"
],
"parameters": [
Expand Down Expand Up @@ -2750,7 +2741,6 @@
"get": {
"summary": "Get entities from related Airports",
"tags": [
"Airports",
"Passengers"
],
"parameters": [
Expand Down Expand Up @@ -3200,7 +3190,6 @@
"get": {
"summary": "Get entities from related Passengers",
"tags": [
"Passengers",
"Pets"
],
"parameters": [
Expand Down
8 changes: 0 additions & 8 deletions tests/__snapshots__/EntitySet/SQLTest__test_metadata__4.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@
"get": {
"summary": "Get entities from related flights",
"tags": [
"flights",
"passengers"
],
"parameters": [
Expand Down Expand Up @@ -520,7 +519,6 @@
"get": {
"summary": "Get entities from related pets",
"tags": [
"pets",
"passengers"
],
"parameters": [
Expand Down Expand Up @@ -948,7 +946,6 @@
"get": {
"summary": "Get entities from related airports",
"tags": [
"airports",
"flights"
],
"parameters": [
Expand Down Expand Up @@ -1127,7 +1124,6 @@
"get": {
"summary": "Get entities from related airports",
"tags": [
"airports",
"flights"
],
"parameters": [
Expand Down Expand Up @@ -1306,7 +1302,6 @@
"get": {
"summary": "Get entities from related airports",
"tags": [
"airports",
"flights"
],
"parameters": [
Expand Down Expand Up @@ -1485,7 +1480,6 @@
"get": {
"summary": "Get entities from related passengers",
"tags": [
"passengers",
"flights"
],
"parameters": [
Expand Down Expand Up @@ -1964,7 +1958,6 @@
"get": {
"summary": "Get entities from related countries",
"tags": [
"countries",
"airports"
],
"parameters": [
Expand Down Expand Up @@ -2105,7 +2098,6 @@
"get": {
"summary": "Get entities from related flights",
"tags": [
"flights",
"airports"
],
"parameters": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,6 @@
"get": {
"summary": "Get entities from related Pets",
"tags": [
"Pets",
"Passengers"
],
"parameters": [
Expand Down Expand Up @@ -1020,7 +1019,6 @@
"get": {
"summary": "Get entities from related Passengers",
"tags": [
"Passengers",
"Pets"
],
"parameters": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@
"get": {
"summary": "Get entities from related Orders",
"tags": [
"Orders",
"Users"
],
"parameters": [
Expand Down Expand Up @@ -710,7 +709,6 @@
"get": {
"summary": "Get entities from related Users",
"tags": [
"Users",
"Orders"
],
"parameters": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@
"get": {
"summary": "Get entities from related Pets",
"tags": [
"Pets",
"People"
],
"parameters": [
Expand Down Expand Up @@ -728,7 +727,6 @@
"get": {
"summary": "Get entities from related People",
"tags": [
"People",
"Pets"
],
"parameters": [
Expand Down

0 comments on commit 0436f25

Please sign in to comment.