Skip to content

OKAPI-1268: Add producesEvents and consumesEvents to ModuleDescriptor - #1485

Closed
pkjacob wants to merge 2 commits into
folio-org:masterfrom
pkjacob:pjacob/OKAPI-1268
Closed

pkjacob wants to merge 2 commits into
folio-org:masterfrom
pkjacob:pjacob/OKAPI-1268

Conversation

@pkjacob

@pkjacob pkjacob commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor
  • Add producesEvents and consumesEvents to ModuleDescriptor
  • With this change, modules can declare the kafka events it produces and consumes.

@pkjacob
pkjacob marked this pull request as draft October 30, 2026 18:32
@pkjacob
pkjacob force-pushed the pjacob/OKAPI-1268 branch 2 times, most recently from 8109cf1 to 465ba15 Compare October 30, 2026 20:15
@pkjacob
pkjacob marked this pull request as ready for review October 30, 2026 20:19
@pkjacob

pkjacob commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

HI @julianladisch

This PR comes from a fork, so the CI workflows failed. (see this)
Could you push the branch to folio-org/okapi so CI runs, as described here - https://dev.folio.org/guidelines/github-actions-frontend/#forked-repositories

git remote add pkjacob https://github.com/pkjacob/okapi
git fetch pkjacob
git checkout pjacob/OKAPI-1268
git push -u origin head

Thanks!

Comment on lines +2984 to +2993
var md = new JsonObject(body);
var produces = md.getJsonArray("producesEvents");
Assert.assertEquals(1, produces.size());
Assert.assertEquals(produced, produces.getJsonObject(0).getString("event"));
var consumes = md.getJsonArray("consumesEvents");
Assert.assertEquals(2, consumes.size());
Assert.assertEquals(consumedOptional, consumes.getJsonObject(0).getString("event"));
Assert.assertEquals(Boolean.TRUE, consumes.getJsonObject(0).getBoolean("optional"));
Assert.assertEquals(consumedRequired, consumes.getJsonObject(1).getString("event"));
Assert.assertFalse(consumes.getJsonObject(1).containsKey("optional"));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using rest-assured's body method results in more concise tests. See lines 2893-2896 for an example.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Thank You. Done.

@julianladisch julianladisch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@julianladisch

Copy link
Copy Markdown
Contributor

Replaced with #1486

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.

2 participants