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

New DSL and Template Support #120

Closed
ritch opened this issue Apr 11, 2017 · 3 comments
Closed

New DSL and Template Support #120

ritch opened this issue Apr 11, 2017 · 3 comments

Comments

@ritch
Copy link
Contributor

ritch commented Apr 11, 2017

Placeholder for now... some areas to flesh out in this issue:

  • new dsl examples, whats new whats the same (eg. properties, relations)
  • templates, what are they, how do they work
  • basic tooling examples

Here is a basic example to get something on paper... I'd assume everything about it will change. The purpose is to start a conversation:

DSL example

resources:
 - Account:
     controller:
       routes:
         - 'GET /summary/{accountNumber} => getSummary(accountNumber : string) => AccountSummary'
       dataSource: accountService
 - Customer:
      api: false
      dataSource: customerService
 - Transaction:
      api: false
      dataSource: transactionService
dataSources:
 - accountService:
   connector: swagger
   url: 'http://.../swagger.json'
 - customerService:
   connector: swagger
   url: 'http://.../swagger.json'
 - transactionService:
   connector: swagger
   url: 'http://.../swagger.json'

Template example

// resource template
function resourceTmpl(resource) {
  ensureFile(modelClassFilename(resource.name), MODEL_CLASS_TMPL, resource);
  ensureFile(controllerFilename(resources.name), CONTROLLER_CLASS_TMPL, resource);
  ensureFile(repositoryFilename(resource.name), REPO_CLASS_TMPL, resource);

  if (resource.dataSource !== false) {
    ensureFile(datasourceFilename(resource.name), DS_TMPL, resource);
  }
}
@dhmlau
Copy link
Member

dhmlau commented Sep 6, 2017

relate to: #441

@stale
Copy link

stale bot commented May 2, 2018

This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.

@stale stale bot added the stale label May 2, 2018
@jannyHou jannyHou removed the stale label May 3, 2018
@bajtos bajtos removed the epic.dsl label Jun 21, 2018
@bajtos bajtos removed the LB4 GA label Jul 23, 2018
@bajtos
Copy link
Member

bajtos commented Jul 23, 2018

I don't see how this story would fit into our current 4.0 GA scope as described in #1449. Considering the long inactivity, I am closing this story as stale. We can always reopen if needed.

@bajtos bajtos removed the non-DP3 label Jul 23, 2018
@bajtos bajtos closed this as completed Jul 23, 2018
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

No branches or pull requests

5 participants