Skip to content

support setting offset Source Information for grammar parser APIs#682

Merged
pierredebelen merged 6 commits intofinos:masterfrom
akphi:gra
May 20, 2022
Merged

support setting offset Source Information for grammar parser APIs#682
pierredebelen merged 6 commits intofinos:masterfrom
akphi:gra

Conversation

@akphi
Copy link

@akphi akphi commented May 17, 2022

This is a continuation of #595

This PR introduces a BREAKING CHANGE as it modifies the API endpoints

Support setting sourceId for value specification in new grammar parser APIs. Also did some minor cleanups. Instead of sending in String and a separate optional boolean flag for returnSourceInfo, we now bundle these and call the structure ParserInput

class ParserSourceInformationOffset {
  public String sourceId = "";
  public int lineOffset = 0;
  public int columnOffset = 0;
}

class ParserInput {
  public String value;
  public ParserSourceInformationOffset;
  public boolean returnSourceInformation = true;
}

NOTE We leave non-batch APIs simple (taking everything as query parameter) so that it's easier to use from REST design perspective, look at the Swagger screenshot below for example

Screen Shot 2022-05-20 at 3 23 16 PM

We also cleanup the grammar composer endpoints to now take RENDER STYLE as a query parameter instead of a path parameter to be more consistent across all grammar APIs.

@akphi akphi changed the title support setting sourceId for new grammar parser APIs support setting sourceId for new grammar parser APIs May 17, 2022
@akphi akphi marked this pull request as draft May 17, 2022 00:16
@akphi akphi force-pushed the gra branch 2 times, most recently from 2e2db3b to bb6cba6 Compare May 17, 2022 03:07
@akphi akphi marked this pull request as ready for review May 17, 2022 04:26
@pierredebelen pierredebelen marked this pull request as draft May 20, 2022 14:39
@github-actions
Copy link

github-actions bot commented May 20, 2022

Test Results

   254 files  +  3     254 suites  +3   50m 31s ⏱️ + 6m 34s
5 133 tests +59  5 101 ✔️ +59  32 💤 ±0  0 ±0 
5 867 runs  +67  5 835 ✔️ +67  32 💤 ±0  0 ±0 

Results for commit 802bd89. ± Comparison against base commit e21227e.

♻️ This comment has been updated with latest results.

@akphi akphi marked this pull request as ready for review May 20, 2022 17:52
@akphi akphi changed the title support setting sourceId for new grammar parser APIs support setting offset Source Information for grammar parser APIs May 20, 2022
@akphi akphi marked this pull request as draft May 20, 2022 18:37
@pierredebelen pierredebelen marked this pull request as ready for review May 20, 2022 20:40
@pierredebelen pierredebelen merged commit a55a508 into finos:master May 20, 2022
@akphi akphi deleted the gra branch May 20, 2022 20:45
rafaelbey pushed a commit to rafaelbey/legend-engine that referenced this pull request Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments