@@ -445,17 +445,35 @@ def get_description(cls) -> str:
445445
446446 credentials_schema = {
447447 "type" : "object" ,
448- "properties" : {"username" : {"type" : "string" }, "password" : {"type" : "string" }},
448+ "properties" : {
449+ "username" : {
450+ "type" : "string" ,
451+ "title" : "Username" ,
452+ },
453+ "password" : {
454+ "type" : "string" ,
455+ "title" : "Password" ,
456+ },
457+ },
449458 "required" : ["username" , "password" ],
450459 }
451460
452461 params_schema = {
453462 "type" : "object" ,
454463 "properties" : {
455- "host" : {"type" : "string" , "description" : "Remote hostname" },
456- "port" : {"type" : "integer" , "description" : "Port" },
457- "dbname" : {"type" : "string" , "description" : "Database name" },
458- "remote_schema" : {"type" : "string" , "description" : "Remote schema name" },
464+ "host" : {
465+ "type" : "string" ,
466+ "title" : "Host" ,
467+ "description" : "Hostname or IP address of the PostgreSQL instance" ,
468+ },
469+ "port" : {"type" : "integer" , "title" : "Port" , "description" : "Port of the database" },
470+ "dbname" : {"type" : "string" , "title" : "Database" , "description" : "Database name" },
471+ "remote_schema" : {
472+ "type" : "string" ,
473+ "title" : "Schema name" ,
474+ "description" : "Schema name to import data from" ,
475+ "default" : "public" ,
476+ },
459477 },
460478 "required" : ["host" , "port" , "dbname" , "remote_schema" ],
461479 }
@@ -503,24 +521,27 @@ def get_remote_schema_name(self) -> str:
503521class MongoDataSource (ForeignDataWrapperDataSource ):
504522 credentials_schema = {
505523 "type" : "object" ,
506- "properties" : {"username" : {"type" : "string" }, "password" : {"type" : "string" }},
524+ "properties" : {
525+ "username" : {"type" : "string" , "title" : "Username" },
526+ "password" : {"type" : "string" , "title" : "Password" },
527+ },
507528 "required" : ["username" , "password" ],
508529 }
509530
510531 params_schema = {
511532 "type" : "object" ,
512533 "properties" : {
513- "host" : {"type" : "string" },
514- "port" : {"type" : "integer" },
534+ "host" : {"type" : "string" , "title" : "Host" },
535+ "port" : {"type" : "integer" , "title" : "Port" },
515536 },
516537 "required" : ["host" , "port" ],
517538 }
518539
519540 table_params_schema = {
520541 "type" : "object" ,
521542 "properties" : {
522- "database" : {"type" : "string" },
523- "collection" : {"type" : "string" },
543+ "database" : {"type" : "string" , "title" : "Database name" },
544+ "collection" : {"type" : "string" , "title" : "Collection name" },
524545 },
525546 "required" : ["database" , "collection" ],
526547 }
@@ -573,16 +594,19 @@ def get_table_schema(self, table_name, table_schema):
573594class MySQLDataSource (ForeignDataWrapperDataSource ):
574595 credentials_schema = {
575596 "type" : "object" ,
576- "properties" : {"username" : {"type" : "string" }, "password" : {"type" : "string" }},
597+ "properties" : {
598+ "username" : {"type" : "string" , "title" : "Username" },
599+ "password" : {"type" : "string" , "title" : "Password" },
600+ },
577601 "required" : ["username" , "password" ],
578602 }
579603
580604 params_schema = {
581605 "type" : "object" ,
582606 "properties" : {
583- "host" : {"type" : "string" },
584- "port" : {"type" : "integer" },
585- "dbname" : {"type" : "string" },
607+ "host" : {"type" : "string" , "title" : "Host" },
608+ "port" : {"type" : "integer" , "title" : "Port" },
609+ "dbname" : {"type" : "string" , "title" : "Database name" },
586610 },
587611 "required" : ["host" , "port" , "dbname" ],
588612 }
@@ -634,16 +658,16 @@ class ElasticSearchDataSource(ForeignDataWrapperDataSource):
634658 credentials_schema = {
635659 "type" : "object" ,
636660 "properties" : {
637- "username" : {"type" : "string" },
638- "password" : {"type" : "string" },
661+ "username" : {"type" : "string" , "title" : "Username" },
662+ "password" : {"type" : "string" , "title" : "Password" },
639663 },
640664 }
641665
642666 params_schema = {
643667 "type" : "object" ,
644668 "properties" : {
645- "host" : {"type" : "string" },
646- "port" : {"type" : "integer" },
669+ "host" : {"type" : "string" , "title" : "Host" },
670+ "port" : {"type" : "integer" , "title" : "Port" },
647671 },
648672 "required" : ["host" , "port" ],
649673 }
@@ -653,27 +677,36 @@ class ElasticSearchDataSource(ForeignDataWrapperDataSource):
653677 "properties" : {
654678 "index" : {
655679 "type" : "string" ,
680+ "title" : "Index name or pattern" ,
656681 "description" : 'ES index name or pattern to use, for example, "events-*"' ,
657682 },
658683 "type" : {
659684 "type" : "string" ,
685+ "title" : "doc_type (ES6 or earlier)" ,
660686 "description" : "Pre-ES7 doc_type, not required in ES7 or later" ,
661687 },
662688 "query_column" : {
663689 "type" : "string" ,
664- "description" : "Name of the column to use to pass queries in" ,
690+ "title" : "Query column name" ,
691+ "description" : "Allows you to do `WHERE query = '{" "match" ": ...}'`" ,
692+ "default" : "query" ,
665693 },
666694 "score_column" : {
667695 "type" : "string" ,
696+ "title" : "Score column name" ,
668697 "description" : "Name of the column with the document score" ,
669698 },
670699 "scroll_size" : {
671700 "type" : "integer" ,
701+ "title" : "Scroll size" ,
672702 "description" : "Fetch size, default 1000" ,
703+ "default" : 1000 ,
673704 },
674705 "scroll_duration" : {
675706 "type" : "string" ,
707+ "title" : "Scroll duration" ,
676708 "description" : "How long to hold the scroll context open for, default 10m" ,
709+ "default" : "10m" ,
677710 },
678711 },
679712 "required" : ["index" ],
0 commit comments