Skip to content

Say at start-up what the Enterprise data file adds in the IP Intelligence API example - #159

Merged
jwrosewell merged 2 commits into
rcfrom
examples/api-find-out-more
Nov 15, 2026
Merged

jwrosewell merged 2 commits into
rcfrom
examples/api-find-out-more

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

The IP Intelligence API example answers in JSON, so on the free Lite data file a caller saw the three registration properties and was never told what the Enterprise data file adds, where to ask for it, or where to find out more.

What the specification says

ip-intelligence-specification/required-examples.md lines 87 to 91 say an example "asks for Properties only the Enterprise data file holds, such as Latitude, Longitude and Areas, says of each one the data file in use cannot give that it needs the Enterprise data file, and once gives a link to the contact page to ask for a copy." device-detection-specification/required-examples.md lines 101 and 102, which IP Intelligence examples follow (line 80), say "Examples MUST also show what only the Enterprise Data File can do".

What changed

When the service starts, GettingStartedApi.java now writes the Enterprise offer with the tagged contact link, when the data file in use is a free one, then the Find out more section. What it writes at start-up is the only place the person running a JSON service reads it. The class Javadoc no longer says the Enterprise file is looked for when no argument is given, as the example has used the Lite file since the free file defaults changed.

How the rule is met here

The API example builds its engine with no property list, so it answers with every property the data file in use holds. With the Enterprise data file its JSON holds Latitude, Longitude and Areas among the rest, and on a free file it holds only the properties that file has. A JSON answer is read by a program, so it has no place for a sentence about each property the file lacks. The example says what the Enterprise data file adds where the person running the service reads it, at start-up, where on a free file the offer names the groups of properties it adds (the location, range and connection properties, from DataFileHelper.writeEnterpriseOffer in the IP Intelligence shared module) and gives the contact link once. The console examples meet the part about each property, as each line for a property the file lacks reads needs the Enterprise data file (#48).

Tests

Test first, 614f935f, change 1b4c73df. GettingStartedApiNotesTest builds the example's engine on the Lite file and expects the offer with the contact link, then the Find out more section.

Red 43673574133 ran the test commit on rc de74c8c plus a throwaway workflow, Java 17, and the test did not compile, as GettingStartedApi.writeStartupNotes does not exist on rc. Green 43673582297 ran the head plus the same workflow, and GettingStartedApiNotesTest passed 1 of 1 and GettingStartedApiTest 4 of 4.

Full build

Run 43674336990 built 1b4c73d merged with rc as each job found it, 2eebbff for the first jobs and 30e8df6 for the last, as #141 and #137 merged into rc at 04:32 during the run, on nine configurations, Ubuntu x64 with Java 8, 11, 17 and 21, Ubuntu arm64 with Java 17, and Windows with Java 8, 11, 17 and 21, and every job passed. GettingStartedApiNotesTest passed 1 of 1 in all nine jobs. Each of its ten Setting 'PullRequestSha' lines names 1b4c73d, and its Configure job printed "Left out 6 macOS entries".

macOS was left out of this draft's full build under the 9 November decision. The rc head is built with macOS before it merges into main.

What it releases

Nothing. The change is in examples, which the release plan leaves out (ci/README.md).

Base branch

rc at de74c8c. A trial merge of the head with rc at 30e8df6 is clean.

…le adds

The service answers in JSON, so what it writes when it starts is the
only place the person running it reads what the Enterprise data file
adds and where to find out more. On the Lite file it must give the
offer with the contact link, then the Find out more section.
…more

The IP Intelligence API example answers in JSON, so on the Lite file a
caller saw the three registration properties and nothing about what
the Enterprise data file adds. When the service starts it now writes the
Enterprise offer with the tagged contact link, when the file in use is a
free one, then the Find out more section. The class Javadoc no longer
says the Enterprise file is looked for when no argument is given, as the
example has used the Lite file since the free file defaults changed.
@jwrosewell
jwrosewell marked this pull request as ready for review November 15, 2026 09:31
@jwrosewell
jwrosewell merged commit 8e53055 into rc Nov 15, 2026
3 checks passed
@jwrosewell
jwrosewell deleted the examples/api-find-out-more branch November 15, 2026 09:31
@jwrosewell jwrosewell mentioned this pull request Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant