lburgazzoli commented on issue #358:
URL: https://github.com/apache/camel-k-runtime/issues/358#issuecomment-652388145


   I've been progressing on this but I'm on a point I don0t know what's wrong 
with my schema so I need a little bit of help understanding why I'm unable to 
get completion working for some of the fields.
   
   Here a stripped-down version of the generated schema:
   
   
   ```json
   {
     "$schema" : "http://json-schema.org/draft-04/schema#";,
     "type" : "array",
     "items" : {
       "definitions" : {
         "steps" : {
           "from" : {
             "type" : "object",
             "properties" : {
               "parameters" : {
                 "type" : "object",
                 "java_type" : "java.util.Map"
               },
               "steps" : {
                 "type" : "array",
                 "items" : {
                   "type" : "string"
                 },
                 "java_type" : "java.util.Collection"
               },
               "uri" : {
                 "type" : "string"
               }
             },
             "steps" : {
               "type" : "array",
               "items" : {
                 "$ref" : "#/items/definitions/step"
               }
             }
           },
           "to" : {
             "oneOf" : [ {
               "type" : "string",
               "java_type" : "java.lang.String"
             }, {
               "type" : "object",
               "properties" : {
                 "pattern" : {
                   "type" : "string",
                   "enum" : [ "InOnly", "InOut", "InOptionalOut" ]
                 },
                 "uri" : {
                   "type" : "string"
                 },
                 "inherit-error-handler" : {
                   "type" : "boolean",
                   "alias" : "inheritErrorHandler"
                 }
               },
               "required" : [ "uri" ]
             } ]
           },
           "log" : {
             "definition-class" : "org.apache.camel.model.LogDefinition",
             "oneOf" : [ {
               "type" : "string",
               "java_type" : "java.lang.String"
             }, {
               "type" : "object",
               "properties" : {
                 "log-name" : {
                   "type" : "string",
                   "alias" : "logName"
                 },
                 "logger-ref" : {
                   "type" : "string",
                   "alias" : "loggerRef"
                 },
                 "logging-level" : {
                   "type" : "string",
                   "alias" : "loggingLevel",
                   "enum" : [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "OFF" ]
                 },
                 "marker" : {
                   "type" : "string"
                 },
                 "message" : {
                   "type" : "string"
                 },
                 "inherit-error-handler" : {
                   "type" : "boolean",
                   "alias" : "inheritErrorHandler"
                 }
               }
             } ]
           }
         },
         "step" : {
           "type" : "object",
           "oneOf" : [ {
             "properties" : {
               "process" : {
                 "$ref" : "#/items/definitions/steps/from"
               }
             }
           }, {
             "properties" : {
               "resequence" : {
                 "$ref" : "#/items/definitions/steps/to"
               }
             }
           }, {
             "properties" : {
               "rest" : {
                 "$ref" : "#/items/definitions/steps/log"
               }
             }
           } ]
         }
       },
       "oneOf" : [ {
         "properties" : {
           "from" : {
             "$ref" : "#/items/definitions/steps/from"
           }
         }
       } ]
     }
   }
   ```
   
   When configuring VSCode to use it for auto completion of camel-k routes 
written in YAML, I can get suggestions for all the fields of the `from` 
definition, however, I get no completion for the `steps` fields and the only 
suggestion is literally `null`
   
   
![image](https://user-images.githubusercontent.com/1868933/86242928-bd691580-bba5-11ea-9ec5-581ab89fba15.png)
   
   
   @lhein @apupier I'd really appreciate if you can help me finding out the 
reason why the auto-completion do not work as the schema appears to be correct 
but there's certainly something I'm missing.
   
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to