@@ -1309,6 +1309,53 @@ paths:
13091309 $ref : ' #/components/schemas/ErrorResponse'
13101310 " 500 " :
13111311 description : Internal Server Error
1312+ post :
1313+ tags :
1314+ - view
1315+ summary : Alter view
1316+ operationId : alterView
1317+ parameters :
1318+ - name : prefix
1319+ in : path
1320+ required : true
1321+ schema :
1322+ type : string
1323+ - name : database
1324+ in : path
1325+ required : true
1326+ schema :
1327+ type : string
1328+ - name : view
1329+ in : path
1330+ required : true
1331+ schema :
1332+ type : string
1333+ requestBody :
1334+ content :
1335+ application/json :
1336+ schema :
1337+ $ref : ' #/components/schemas/AlterViewRequest'
1338+ responses :
1339+ " 200 " :
1340+ description : Success, no content
1341+ " 401 " :
1342+ description : Unauthorized
1343+ content :
1344+ application/json :
1345+ schema :
1346+ $ref : ' #/components/schemas/ErrorResponse'
1347+ " 404 " :
1348+ description : Resource not found
1349+ content :
1350+ application/json :
1351+ schema :
1352+ $ref : ' #/components/schemas/ErrorResponse'
1353+ " 500 " :
1354+ description : Internal Server Error
1355+ content :
1356+ application/json :
1357+ schema :
1358+ $ref : ' #/components/schemas/ErrorResponse'
13121359 delete :
13131360 tags :
13141361 - view
@@ -1521,6 +1568,7 @@ components:
15211568 type : string
15221569 resourceType :
15231570 type : string
1571+ enum : ["DATABASE", "TABLE", "COLUMN", "SNAPSHOT", "BRANCH", "TAG", "VIEW", "DIALECT", "UNKNOWN"]
15241572 resourceName :
15251573 type : string
15261574 code :
@@ -1540,6 +1588,80 @@ components:
15401588 $ref : ' #/components/schemas/Identifier'
15411589 schema :
15421590 $ref : ' #/components/schemas/ViewSchema'
1591+ AlterViewRequest :
1592+ type : object
1593+ properties :
1594+ changes :
1595+ type : array
1596+ items :
1597+ $ref : ' #/components/schemas/ViewChange'
1598+ ViewChange :
1599+ anyOf :
1600+ - $ref : ' #/components/schemas/SetViewOption'
1601+ - $ref : ' #/components/schemas/RemoveViewOption'
1602+ - $ref : ' #/components/schemas/UpdateViewComment'
1603+ - $ref : ' #/components/schemas/AddDialect'
1604+ - $ref : ' #/components/schemas/UpdateDialect'
1605+ - $ref : ' #/components/schemas/DropDialect'
1606+ required :
1607+ - action
1608+ properties :
1609+ action :
1610+ type : string
1611+ SetViewOption :
1612+ type : object
1613+ properties :
1614+ action :
1615+ type : string
1616+ const : " setOption"
1617+ key :
1618+ type : string
1619+ value :
1620+ type : string
1621+ RemoveViewOption :
1622+ type : object
1623+ properties :
1624+ action :
1625+ type : string
1626+ const : " removeOption"
1627+ key :
1628+ type : string
1629+ UpdateViewComment :
1630+ type : object
1631+ properties :
1632+ action :
1633+ type : string
1634+ const : " comment"
1635+ key :
1636+ type : string
1637+ AddDialect :
1638+ type : object
1639+ properties :
1640+ action :
1641+ type : string
1642+ const : " addDialect"
1643+ dialect :
1644+ type : string
1645+ query :
1646+ type : string
1647+ UpdateDialect :
1648+ type : object
1649+ properties :
1650+ action :
1651+ type : string
1652+ const : " updateDialect"
1653+ dialect :
1654+ type : string
1655+ query :
1656+ type : string
1657+ DropDialect :
1658+ type : object
1659+ properties :
1660+ action :
1661+ type : string
1662+ const : " dropDialect"
1663+ dialect :
1664+ type : string
15431665 DataField :
15441666 type : object
15451667 properties :
@@ -1600,7 +1722,7 @@ components:
16001722 fields :
16011723 type : array
16021724 items :
1603- $ref : ' #/components/schemas/DataField'
1725+ $ref : ' #/components/schemas/DataField'
16041726 Identifier :
16051727 type : object
16061728 properties :
@@ -1667,12 +1789,17 @@ components:
16671789 - $ref : ' #/components/schemas/UpdateColumnType'
16681790 - $ref : ' #/components/schemas/UpdateColumnPosition'
16691791 - $ref : ' #/components/schemas/UpdateColumnNullability'
1792+ required :
1793+ - action
1794+ properties :
1795+ action :
1796+ type : string
16701797 SetOption :
16711798 type : object
16721799 properties :
16731800 action :
16741801 type : string
1675- enum : [ "setOption"]
1802+ const : " setOption"
16761803 key :
16771804 type : string
16781805 value :
@@ -1682,23 +1809,23 @@ components:
16821809 properties :
16831810 action :
16841811 type : string
1685- enum : [ "removeOption"]
1812+ const : " removeOption"
16861813 key :
16871814 type : string
16881815 UpdateComment :
16891816 type : object
16901817 properties :
16911818 action :
16921819 type : string
1693- enum : [ "updateComment"]
1820+ const : " updateComment"
16941821 comment :
16951822 type : string
16961823 AddColumn :
16971824 type : object
16981825 properties :
16991826 action :
17001827 type : string
1701- enum : [ "addColumn"]
1828+ const : " addColumn"
17021829 fieldNames :
17031830 type : array
17041831 items :
@@ -1714,7 +1841,7 @@ components:
17141841 properties :
17151842 action :
17161843 type : string
1717- enum : [ "renameColumn"]
1844+ const : " renameColumn"
17181845 fieldNames :
17191846 type : array
17201847 items :
@@ -1726,7 +1853,7 @@ components:
17261853 properties :
17271854 action :
17281855 type : string
1729- enum : [ "dropColumn"]
1856+ const : " dropColumn"
17301857 fieldNames :
17311858 type : array
17321859 items :
@@ -1736,7 +1863,7 @@ components:
17361863 properties :
17371864 action :
17381865 type : string
1739- enum : [ "updateColumnComment" ]
1866+ const : " updateColumnComment"
17401867 fieldNames :
17411868 type : array
17421869 items :
@@ -1748,7 +1875,7 @@ components:
17481875 properties :
17491876 action :
17501877 type : string
1751- enum : [ "updateColumnType" ]
1878+ const : " updateColumnType"
17521879 fieldNames :
17531880 type : array
17541881 items :
@@ -1762,15 +1889,15 @@ components:
17621889 properties :
17631890 action :
17641891 type : string
1765- enum : [ "updateColumnPosition" ]
1892+ const : " updateColumnPosition"
17661893 move :
17671894 $ref : ' #/components/schemas/Move'
17681895 UpdateColumnNullability :
17691896 type : object
17701897 properties :
17711898 action :
17721899 type : string
1773- enum : [ "update_column_nullability" ]
1900+ const : " update_column_nullability"
17741901 fieldNames :
17751902 type : array
17761903 items :
@@ -1811,12 +1938,17 @@ components:
18111938 anyOf :
18121939 - $ref : ' #/components/schemas/SnapshotInstant'
18131940 - $ref : ' #/components/schemas/TagInstant'
1941+ required :
1942+ - type
1943+ properties :
1944+ type :
1945+ type : string
18141946 SnapshotInstant :
18151947 type : object
18161948 properties :
18171949 ' type ' :
18181950 type : string
1819- enum : [ "snapshot" ]
1951+ const : " snapshot"
18201952 snapshotId :
18211953 type : integer
18221954 format : int64
@@ -1825,7 +1957,7 @@ components:
18251957 properties :
18261958 ' type ' :
18271959 type : string
1828- enum : [ "tag" ]
1960+ const : " tag"
18291961 tagName :
18301962 type : string
18311963 Snapshot :
0 commit comments