personium / personium-engine

Additional module for personium-core to enable server-side JavaScript execution.
Apache License 2.0
16 stars 7 forks source link

Implement dynamic path for engine script #130

Closed yoh1496 closed 3 years ago

yoh1496 commented 3 years ago

This PR closes https://github.com/personium/personium-core/issues/338 .

You can configure service collection endpoint name with JAX-RX URI Template pattern.

Like this.

<p:service language="JavaScript" xmlns:p="urn:x-personium:xmlns" xmlns:D="DAV:">
  <p:path name="{id: \d.}/edit" src="edit.js"/>
  <p:path name="{id: \d.}/view" src="view.js"/>
</p:service>

Test Codes

ScriptTestForDynamicPath.java is must be done by mvn test commmand with arg -Dio.personium.test.service=true.

yoh1496 commented 3 years ago

I'll create another PR for modifying test codes folder strucuture and GitHub actions for test