Repository navigation
Java uses the default JSON endpoint and still accepts the old one - #23
Merged
Merged
Conversation
jwrosewell
marked this pull request as ready for review
November 10, 2026 08:44
Merged
jwrosewell
added a commit
that referenced
this pull request
Nov 10, 2026
* Find the Java example in 51degrees-java (#16) * Find the dotnet example in 51degrees-dotnet (#17) device-detection-dotnet-examples has moved into 51degrees-dotnet, under examples/device-detection. Both dotnet demos, pmp-web and GettingStarted-Web, are found there as siblings, and the docs name the monorepo. * Find the Node example in 51degrees-node (#18) * Find the Node example in 51degrees-node * Copy the monorepo packages in when installing the Node example * Check that only rc merges into the default branch (#19) * Find the Python example in 51degrees-python (#20) * Find the PHP example in 51degrees-php (#21) * Java uses the default JSON endpoint and still accepts the old one (#23) * Let Java use the default JSON endpoint and still accept its old one * Say once which JSON path each language uses --------- Co-authored-by: ben51degrees <ben@51degrees.com> Co-authored-by: Jamesr51d <122470673+Jamesr51d@users.noreply.github.com> Co-authored-by: Eugene Dorfman <justadreamer2007@gmail.com>
jwrosewell
added a commit
that referenced
this pull request
Nov 11, 2026
* Find the Java example in 51degrees-java (#16) * Find the dotnet example in 51degrees-dotnet (#17) device-detection-dotnet-examples has moved into 51degrees-dotnet, under examples/device-detection. Both dotnet demos, pmp-web and GettingStarted-Web, are found there as siblings, and the docs name the monorepo. * Find the Node example in 51degrees-node (#18) * Find the Node example in 51degrees-node * Copy the monorepo packages in when installing the Node example * Check that only rc merges into the default branch (#19) * Find the Python example in 51degrees-python (#20) * Find the PHP example in 51degrees-php (#21) * Java uses the default JSON endpoint and still accepts the old one (#23) * Let Java use the default JSON endpoint and still accept its old one * Say once which JSON path each language uses * Give the .NET example the _51DEGREES_ variable names alongside the old ones (#25) * Test that the .NET example is given the underscore variable names The .NET cloud web example reads the resource key from _51DEGREES_RESOURCE_KEY and the cloud endpoint from _51DEGREES_CLOUD_ENDPOINT, with no other name, once its rename is released. * Give the .NET example the _51DEGREES_ variable names The .NET cloud web example now reads the resource key from _51DEGREES_RESOURCE_KEY and the endpoint from _51DEGREES_CLOUD_ENDPOINT, with no other name. Released versions of it read SUPER_RESOURCE_KEY and FIFTYONE_CLOUD_ENDPOINT, so the harness sets both pairs until every language has released with the new names. --------- Co-authored-by: ben51degrees <ben@51degrees.com> Co-authored-by: Jamesr51d <122470673+Jamesr51d@users.noreply.github.com> Co-authored-by: Eugene Dorfman <justadreamer2007@gmail.com>
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Java descriptor in
Examples/ExampleApps.cssetsJsonEndpointPathto/51Degrees.core.json. The specification's path is/51dpipeline/json, which .NET and Go use and which is this suite's default. 51degrees-java draft #80 (head 2d741ef6) makes Java default to/51dpipeline/jsonand still answer the old path, and the script it serves calls/51dpipeline/json. With the old override the session storage cache test proxies and counts only/51Degrees.core.json, so Java #80's full build fails with "the first page must call the json endpoint at least once".Change
JsonEndpointPath, so Java uses the default like the other languages.ExampleDescriptorgainsAlternativeJsonEndpointPaths, older paths an integration still answers. Java lists/51Degrees.core.jsonthere.ExampleApps.JsonEndpointPathsreturns the default plus those alternatives.TestHelpers.ExampleProxyListenerproxies every path in the list, and the session storage cache test counts POSTs to any of them.The suite therefore passes against Java
rc(script calls/51Degrees.core.json) and against Java #80 (script calls/51dpipeline/json). The merge order does not matter, and the alternative path can be removed once Java #80 has reachedrcandmain.How this was checked
Java's CI clones this repository's
maininci/run-integration-tests.ps1(line 97), honouring an environment variableSELENIUM_TESTS_REF. Nothing in common-ci'snightly-pull-request.ymlor Java's workflows sets that variable or accepts one, so Java #80's full build cannot be pointed at this branch without changing 51degrees-java or merging here. It has not been run against this branch. This repository has no secrets, so its own workflow cannot run the Contract tests either.This repository's own Build and test workflow runs on this pull request and proves the change compiles and the non-browser tests pass.
Remaining
After merge, rerun Java #80's full build (and Java
rc's) to confirm the contract tests pass with both script paths.