[FOLIO-600] Is raml-util/ramls/tenantPermissions.raml still required Created: 13/May/17  Updated: 12/Nov/18  Resolved: 30/May/17

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P3
Reporter: David Crossley Assignee: Heikki Levanto
Resolution: Done Votes: 0
Labels: raml
Remaining Estimate: Not Specified
Time Spent: 6 hours, 40 minutes
Original estimate: Not Specified

Sprint:

 Description   

A part of doing FOLIO-573 Closed required each mod-* raml-util to be updated. That was okay for most modules (i.e. some are not yet updated).

However for raml-module-builder, at compile-time it tried to process the recently-ish added folio-org/raml/ramls/tenantPermissions.raml
and gagged on it because of RMB-1 Closed .

I wonder if this RAML is superfluous, because that is now provided by
folio-org/raml/ramls/mod-permissions/permission_interface.raml

It is currently in Okapi raml-util.



 Comments   
Comment by David Crossley [ 24/May/17 ]

Kurt Nordstrom, Heikki Levanto Would someone please confirm that this RAML and schema can be removed. If so, then i can do it.

Comment by Heikki Levanto [ 24/May/17 ]

Hmm, I must admit I am confused about this.

Okapi includes tenantPermissions.raml, which it gets from the git submodule ramls.git. The raml refers to tenantPermissions.schema, from the same git submidule.

As far as I recall, Okapi does not make any active use of this raml, it is there just to document the interface. When Okapi enables a module for a tenant, it checks if we have any enabledmodule that provides the "_tenantPermissions" interface. Typically this would be mod-permissions. If yes, it creates a list of Permission objects (that correspond to the tenantPermission.json, without directly referring to it), and POSTs those to the interface. (I verified, removing the raml and schema does not disturb Okapi. All tests pass just fine without)

As far as I can see, mod-permissions refer to the permission_interface.raml. So we may have a disconnect here. Would be good to get this cleared up before I start changing the interface for MODPERMS-8 Closed .

I also recall that we once decided that schemas should be named in CamelCase, not with_underscores. Not that this is a very important point.

I think you can safely remove the raml and schema.

Comment by Heikki Levanto [ 24/May/17 ]

The schema and raml live in the raml project, that is included as a git submodule in Okapi and other projects. You should probably make and commit your changes in the raml project first, and the update Okapi to use the latest version of that. Something like this:

  cd okapi/okapi-core/src/main/raml/raml-util
  git pull
  git checkout master
  cd ..
  git add raml
  git commit
  git push
Comment by Heikki Levanto [ 24/May/17 ]

P.S. It would be cool if you could do this before next week. I will be away until Monday, but then I need to start to mess with this interface.

Comment by Heikki Levanto [ 24/May/17 ]

I might as well do the Okapi stuff myself. Feel free to edit the raml project, I will update Okapi to reflect that. It is not really using those schemas for anything anyway, so nothing (much?) should break. (Kurt and David, you may want to coordinate about the visibility flag in the schema)

Comment by David Crossley [ 26/May/17 ]

That is ready now in okapi/pull/276.

Lots of other updates to raml-util are coming along with it (see the list in the PR).

Comment by David Crossley [ 30/May/17 ]

Heikki Levanto This is done in the okapi/pull/276

Comment by Heikki Levanto [ 30/May/17 ]

I merged the pull request. Okapi seems to work just fine. Not surprising, since Okapi does not really make use of any of the raml-utils.

Generated at Thu Feb 08 23:06:59 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.