-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement: Add example highlight hover content for the schema defin…
…ition doc and test Signed-off-by: Siddhi Agrawal <[email protected]>
- Loading branch information
1 parent
98739db
commit aed9add
Showing
3 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
kclvm/tools/src/LSP/src/test_data/hover_test/schema_with_examples.k
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
schema Server: | ||
"""Server is an abstraction of Deployment and StatefulSet. | ||
|
||
Attributes | ||
---------- | ||
workloadType : str, default is "Deployment", required | ||
Use this attribute to specify which kind of long-running service you want. | ||
Valid values: Deployment, StatefulSet. | ||
name : str, required | ||
The name of the long-running service. | ||
labels : {str:str}, optional | ||
The labels of the long-running service. | ||
|
||
Examples | ||
-------- | ||
import models.kube.frontend | ||
import models.kube.frontend.container | ||
import models.kube.templates.resource as res_tpl | ||
|
||
appConfiguration: frontend.Server { | ||
mainContainer = container.Main { | ||
name = "php-redis" | ||
env: { | ||
"GET_HOSTS_FROM": {value = "dns"} | ||
} | ||
} | ||
} | ||
""" | ||
workloadType : str = "Deployment" | ||
name: str | ||
labels?: {str: str} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters