forked from opentripplanner/OpenTripPlanner
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev-2.x' of github.com:opentripplanner/OpenTripPlanner …
…into car-transferrequest-filtering
- Loading branch information
Showing
242 changed files
with
6,410 additions
and
3,379 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,13 +30,14 @@ | |
copy them directly into your environment, or perhaps include them in your | ||
favored resource bundler. | ||
--> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/graphiql@3.0.4/graphiql.min.css" integrity="sha256-wTzfn13a+pLMB5rMeysPPR1hO7x0SwSeQI+cnw7VdbE=" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/graphiql@3.8.3/graphiql.min.css" integrity="sha256-sYaCR/jgUCzYaeWB9fPLVbM0hi5/UbHWy6zhEFm5rcI=" crossorigin="anonymous"> | ||
<title>OTP GraphQL Explorer</title> | ||
</head> | ||
|
||
<body> | ||
<div id="graphiql">Loading...</div> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/graphiql.min.js" integrity="sha256-t0BNtgZ2L82dpHhlgKJl4yJ1tbQxcp1N5NkEjR82A7E=" crossorigin="anonymous"></script> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/graphiql.min.js" integrity="sha256-IvqrlAZ7aV5feVlhn75obrzIlVACoMl9mGvLukrUvCw=" crossorigin="anonymous"></script> | ||
|
||
<script> | ||
const gtfsExampleQuery = ` | ||
|
@@ -131,6 +132,11 @@ | |
updateURL(); | ||
} | ||
|
||
function onEditHeaders(headers) { | ||
parameters.headers = headers; | ||
updateURL(); | ||
} | ||
|
||
function updateURL() { | ||
if(parameters["query"] !== gtfsExampleQuery && parameters["query"] !== transmodelExampleQuery) { | ||
|
||
|
@@ -168,16 +174,18 @@ | |
window.location.reload(); | ||
}; | ||
|
||
function graphQLFetcher(graphQLParams) { | ||
function graphQLFetcher(query, { headers }) { | ||
const defaultHeaders = { | ||
Accept: 'application/json', | ||
'Content-Type': 'application/json', | ||
} | ||
const mergedHeaders = Object.assign({}, defaultHeaders, headers); | ||
return fetch( | ||
urls[apiFlavor], | ||
{ | ||
method: 'post', | ||
headers: { | ||
Accept: 'application/json', | ||
'Content-Type': 'application/json', | ||
}, | ||
body: JSON.stringify(graphQLParams), | ||
headers: mergedHeaders, | ||
body: JSON.stringify(query), | ||
credentials: 'omit', | ||
}, | ||
).then(function (response) { | ||
|
@@ -198,10 +206,12 @@ | |
defaultVariableEditorOpen: true, | ||
query: parameters.query || defaultQueries[apiFlavor], | ||
variables: parameters.variables, | ||
headers: parameters.headers, | ||
operationName: parameters.operationName, | ||
onEditQuery: onEditQuery, | ||
onEditVariables: onEditVariables, | ||
onEditOperationName: onEditOperationName, | ||
onEditHeaders: onEditHeaders, | ||
defaultEditorToolsVisibility: true | ||
}, | ||
React.createElement(GraphiQL.Logo, {}, [header, select])); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...t/resources/org/opentripplanner/ext/apis/transmodel/custom-documentation-entur.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Use: | ||
# <TypeName>[.<FieldName>].(description|deprecated)[.append] | ||
# | ||
# Examples | ||
# // Replace the existing type description | ||
# Quay.description=The place for boarding/alighting a vehicle | ||
# | ||
# // Append to the existing type description | ||
# Quay.description.append=Append | ||
# | ||
# // Replace the existing field description | ||
# Quay.name.description=The public name | ||
# | ||
# // Append to the existing field description | ||
# Quay.name.description.append=(Source NSR) | ||
# | ||
# // Insert deprecated reason. Due to a bug in the Java GraphQL lib, an existing deprecated | ||
# // reason cannot be updated. Deleting the reason from the schema, and adding it back using | ||
# // the "default" TransmodelApiDocumentationProfile is a workaround. | ||
# Quay.name.deprecated=This field is deprecated ... | ||
|
||
|
||
TariffZone.description=A **zone** used to define a zonal fare structure in a zone-counting or \ | ||
zone-matrix system. This includes TariffZone, as well as the specialised FareZone elements. \ | ||
TariffZones are deprecated, please use FareZones. \ | ||
\ | ||
**TariffZone data will not be maintained from 1. MAY 2025 (Entur).** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.