Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add properties property for Template class #3272

Merged
merged 14 commits into from
Feb 8, 2021

Conversation

Danieladu
Copy link
Contributor

@Danieladu Danieladu commented Feb 5, 2021

Fixes: #3273

Description

For some requirements from Composer side. Describe here:
Structure LG parsed result should cover the common key/value pairs results.

For example:

# template
[Activity
 Text=good
 Speak=hi
]

The parsed Template would contains a property named properties, in which would contains:

properties: {Text: "good", Speak:"hi", $type:'Activity'}

Particular cases

  • Pure Expression reference would be ignore
[A
 key1=value1
 ${T2()}     -> this one would be ignored
]
  • would keep the origin list info
[A
 list = a | b
]

the properties would be:
{list: ['a', 'b'], $type: 'A'}

@coveralls
Copy link

coveralls commented Feb 5, 2021

Pull Request Test Coverage Report for Build 547363540

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.03%) to 84.901%

Files with Coverage Reduction New Missed Lines %
libraries/botbuilder-lg/src/templatesParser.ts 1 89.46%
libraries/botbuilder-lg/src/template.ts 1 75.0%
Totals Coverage Status
Change from base Build 546814253: 0.03%
Covered Lines: 18306
Relevant Lines: 20581

💛 - Coveralls

@boydc2014
Copy link
Contributor

boydc2014 commented Feb 5, 2021

Composer also need the type, ie, Activity, HeroCard, like that.

So, it would be good to have a $type property in that json

@Danieladu Danieladu marked this pull request as ready for review February 7, 2021 03:32
@Danieladu Danieladu requested review from a team as code owners February 7, 2021 03:32
@Danieladu Danieladu requested review from tomlm and luhan2017 February 7, 2021 03:32
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.

[Feature Request-LG Parser API] Include structured response parse data in template
4 participants