partial implementation of new lightbeam create
functionality
#56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a draft PR with a partial implementation of a new function,
lightbeam create
(typically used with a-s
selector), which, in the current dir, derived from the Ed-Fi API's Swagger:earthmover.yml
with emptysources
andtransformations
butdestinations
for each selected endpoint, plus comments indicating what column names and data types/values are required, and the required grain of the table (based on Swagger isIdentity fields)templates/*.jsont
for each selected endpoint, with skeleton JSON that includes all the required fields (including nested ones), optional fields wrapped in conditionals, and comments with some of the property metadata from Swagger, like type, description, isIdentity, etc.earthmover.yml
'ssources
andtransformations
(The idea for this feature arose from discussions with a developer who figured out how to use earthmover but was struggling to learn how to construct the Ed-Fi payloads.
lightbeam create
will help scaffold developers by automatically creating some of the boilerplate code required for an earthmover Ed-Fi project.)I want to wait for PR 54 to be reviewed and merged so I can incorporate its refactor of
api.get_params_for_endpoint()
and addition ofutil.get_swagger_ref_for_endpoint()
here. I'd like to implementapi.get_params_for_endpoint(..., type='all')
to build the sample payload for each endpoint, such aswhich can then be turned into a JSON template such as