mirror of https://github.com/databricks/cli.git
wip
This commit is contained in:
parent
414a6848ce
commit
7a613f07a5
|
@ -162,7 +162,7 @@ func (reader *OpenapiReader) jobsDocs() (*Docs, error) {
|
||||||
// TODO: add description for id if needed.
|
// TODO: add description for id if needed.
|
||||||
// Tracked in https://github.com/databricks/cli/issues/242
|
// Tracked in https://github.com/databricks/cli/issues/242
|
||||||
jobsDocs := &Docs{
|
jobsDocs := &Docs{
|
||||||
Description: "List of job definations",
|
Description: "List of Databricks jobs",
|
||||||
AdditionalProperties: jobDocs,
|
AdditionalProperties: jobDocs,
|
||||||
}
|
}
|
||||||
return jobsDocs, nil
|
return jobsDocs, nil
|
||||||
|
@ -177,12 +177,25 @@ func (reader *OpenapiReader) pipelinesDocs() (*Docs, error) {
|
||||||
// TODO: Two fields in resources.Pipeline have the json tag id. Clarify the
|
// TODO: Two fields in resources.Pipeline have the json tag id. Clarify the
|
||||||
// semantics and then add a description if needed. (https://github.com/databricks/cli/issues/242)
|
// semantics and then add a description if needed. (https://github.com/databricks/cli/issues/242)
|
||||||
pipelinesDocs := &Docs{
|
pipelinesDocs := &Docs{
|
||||||
Description: "List of pipeline definations",
|
Description: "List of DLT pipelines",
|
||||||
AdditionalProperties: pipelineDocs,
|
AdditionalProperties: pipelineDocs,
|
||||||
}
|
}
|
||||||
return pipelinesDocs, nil
|
return pipelinesDocs, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (reader *OpenapiReader) experimentsDocs() (*Docs, error) {
|
||||||
|
experimentSpecSchema, err := reader.readResolvedSchema(SchemaPathPrefix + "ml.Experiment")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
experimentDocs := schemaToDocs(experimentSpecSchema)
|
||||||
|
experimentsDocs := &Docs{
|
||||||
|
Description: "List of MLflow experiments",
|
||||||
|
AdditionalProperties: experimentDocs,
|
||||||
|
}
|
||||||
|
return experimentsDocs, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (reader *OpenapiReader) ResourcesDocs() (*Docs, error) {
|
func (reader *OpenapiReader) ResourcesDocs() (*Docs, error) {
|
||||||
jobsDocs, err := reader.jobsDocs()
|
jobsDocs, err := reader.jobsDocs()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -192,12 +205,17 @@ func (reader *OpenapiReader) ResourcesDocs() (*Docs, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
experimentsDocs, err := reader.experimentsDocs()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
return &Docs{
|
return &Docs{
|
||||||
Description: "Specification of databricks resources to instantiate",
|
Description: "Collection of Databricks resources to deploy.",
|
||||||
Properties: map[string]*Docs{
|
Properties: map[string]*Docs{
|
||||||
"jobs": jobsDocs,
|
"jobs": jobsDocs,
|
||||||
"pipelines": pipelinesDocs,
|
"pipelines": pipelinesDocs,
|
||||||
|
"experiments": experimentsDocs,
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue