{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/1135","repository_url":"https://api.github.com/repos/GoogleContainerTools/skaffold","labels_url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/1135/labels{/name}","comments_url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/1135/comments","events_url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/1135/events","html_url":"https://github.com/GoogleContainerTools/skaffold/issues/1135","id":368771839,"node_id":"MDU6SXNzdWUzNjg3NzE4Mzk=","number":1135,"title":"skaffold.yaml schema generation","user":{"login":"etanshaul","id":1735744,"node_id":"MDQ6VXNlcjE3MzU3NDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1735744?v=4","gravatar_id":"","url":"https://api.github.com/users/etanshaul","html_url":"https://github.com/etanshaul","followers_url":"https://api.github.com/users/etanshaul/followers","following_url":"https://api.github.com/users/etanshaul/following{/other_user}","gists_url":"https://api.github.com/users/etanshaul/gists{/gist_id}","starred_url":"https://api.github.com/users/etanshaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etanshaul/subscriptions","organizations_url":"https://api.github.com/users/etanshaul/orgs","repos_url":"https://api.github.com/users/etanshaul/repos","events_url":"https://api.github.com/users/etanshaul/events{/privacy}","received_events_url":"https://api.github.com/users/etanshaul/received_events","type":"User","site_admin":false},"labels":[{"id":822822864,"node_id":"MDU6TGFiZWw4MjI4MjI4NjQ=","url":"https://api.github.com/repos/GoogleContainerTools/skaffold/labels/feature-request","name":"feature-request","color":"d3f285","default":false},{"id":836663334,"node_id":"MDU6TGFiZWw4MzY2NjMzMzQ=","url":"https://api.github.com/repos/GoogleContainerTools/skaffold/labels/priority/p1","name":"priority/p1","color":"ede444","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-10T17:28:48Z","updated_at":"2018-10-22T18:05:18Z","closed_at":null,"author_association":"NONE","body":"This is to start the discussion around generating a schema for `skaffold.yaml` consumable by other tools like IDEs and editors.\r\n\r\nIn [google-container-tools-intellij](https://github.com/GoogleContainerTools/google-container-tools-intellij) we are building out editing support for Skaffold. This includes things autocomplete, file inspections etc. To do this in a robust way (keeping up with schema changes and so on), we'd like to have a versioned schema that ideally is auto-generated, possibly using a Go struct to JSON schema generator.\r\n\r\nAs an example, the IntelliJ Kubernetes plugin currently provides support for editing Kubernetes manifests. It accomplishes this by consuming the published [k8s openapi-spec](https://github.com/kubernetes/kubernetes/tree/master/api/openapi-spec). Within this spec, are definitions (in the form of JSON schema) such as the following Deployment schema:\r\n\r\n```\r\n   \"io.k8s.api.apps.v1.Deployment\": {\r\n    \"description\": \"Deployment enables declarative updates for Pods and ReplicaSets.\",\r\n    \"properties\": {\r\n     \"apiVersion\": {\r\n      \"description\": \"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources\",\r\n      \"type\": \"string\"\r\n     },\r\n     \"kind\": {\r\n      \"description\": \"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\",\r\n      \"type\": \"string\"\r\n     },\r\n     \"metadata\": {\r\n      \"description\": \"Standard object metadata.\",\r\n      \"$ref\": \"#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta\"\r\n     },\r\n     \"spec\": {\r\n      \"description\": \"Specification of the desired behavior of the Deployment.\",\r\n      \"$ref\": \"#/definitions/io.k8s.api.apps.v1.DeploymentSpec\"\r\n     },\r\n     \"status\": {\r\n      \"description\": \"Most recently observed status of the Deployment.\",\r\n      \"$ref\": \"#/definitions/io.k8s.api.apps.v1.DeploymentStatus\"\r\n     }\r\n    },\r\n    \"x-kubernetes-group-version-kind\": [\r\n     {\r\n      \"group\": \"apps\",\r\n      \"kind\": \"Deployment\",\r\n      \"version\": \"v1\"\r\n     }\r\n    ]\r\n   }\r\n```\r\n\r\nThis spec is consumed by the plugin to provide [rich editing support](https://blog.jetbrains.com/idea/2018/03/intellij-idea-2018-1-kubernetes-support/).\r\n\r\nProducing a JSON schema like this for `skaffold.yaml` would allow us to create the same level of editor support. (Note there is some extra metadata in there not currently in the Skaffold Go structs, like `description` which would be nice to have as well).\r\n\r\nAny thoughts, concerns?"},"comment":{"url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/comments/431918116","html_url":"https://github.com/GoogleContainerTools/skaffold/issues/1135#issuecomment-431918116","issue_url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/1135","id":431918116,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTkxODExNg==","user":{"login":"etanshaul","id":1735744,"node_id":"MDQ6VXNlcjE3MzU3NDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1735744?v=4","gravatar_id":"","url":"https://api.github.com/users/etanshaul","html_url":"https://github.com/etanshaul","followers_url":"https://api.github.com/users/etanshaul/followers","following_url":"https://api.github.com/users/etanshaul/following{/other_user}","gists_url":"https://api.github.com/users/etanshaul/gists{/gist_id}","starred_url":"https://api.github.com/users/etanshaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etanshaul/subscriptions","organizations_url":"https://api.github.com/users/etanshaul/orgs","repos_url":"https://api.github.com/users/etanshaul/repos","events_url":"https://api.github.com/users/etanshaul/events{/privacy}","received_events_url":"https://api.github.com/users/etanshaul/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T18:05:18Z","updated_at":"2018-10-22T18:05:18Z","author_association":"NONE","body":"@balopat I totally would share your concern about Open API. But given that we just need a JSON schema (which has no ties to RESTful API definition), does that alleviate the concern? Maybe I missed your point?\r\n\r\nTo clarify for those who haven't reviewed the internal doc: The example I mention about Open API is just an implementation detail used by the IntelliJ Kubernetes plugin. The actual validation comes from a JSON Schema (that happens to be contained within the OpenApi spec). "}}
{"actor":{"display_login":"etanshaul"}}