@innet/server 2.0.0-alpha.19 → 2.0.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +137 -0
- package/package.json +1 -1
- package/plugins/schema/any/any.d.ts +1 -1
package/README.md
CHANGED
|
@@ -1619,6 +1619,7 @@ return (
|
|
|
1619
1619
|
|
|
1620
1620
|
[← back](#index)
|
|
1621
1621
|
|
|
1622
|
+
[\<any>](#any)
|
|
1622
1623
|
[\<null>](#null)
|
|
1623
1624
|
[\<boolean>](#boolean)
|
|
1624
1625
|
[\<string>](#string)
|
|
@@ -1628,6 +1629,142 @@ return (
|
|
|
1628
1629
|
[\<uuid>](#uuid)
|
|
1629
1630
|
[\<binary>](#binary)
|
|
1630
1631
|
|
|
1632
|
+
### \<any>
|
|
1633
|
+
|
|
1634
|
+
[← back](#primitive-data)
|
|
1635
|
+
|
|
1636
|
+
The element MUST be placed inside one of [\<response>](#response), [\<param>](#param), [\<body>](#body).
|
|
1637
|
+
It defines `any` value for a parent element.
|
|
1638
|
+
`@innet/server` formats and validate the value automatically (real-time).
|
|
1639
|
+
|
|
1640
|
+
*src/app.tsx*
|
|
1641
|
+
```typescript jsx
|
|
1642
|
+
export default (
|
|
1643
|
+
<server>
|
|
1644
|
+
<api>
|
|
1645
|
+
<endpoint method='get' path='/todos'>
|
|
1646
|
+
<param
|
|
1647
|
+
in='query'
|
|
1648
|
+
name='search'>
|
|
1649
|
+
<any />
|
|
1650
|
+
</param>
|
|
1651
|
+
</endpoint>
|
|
1652
|
+
</api>
|
|
1653
|
+
</server>
|
|
1654
|
+
)
|
|
1655
|
+
```
|
|
1656
|
+
|
|
1657
|
+
#### default
|
|
1658
|
+
|
|
1659
|
+
A default value for the `any`.
|
|
1660
|
+
|
|
1661
|
+
*src/app.tsx*
|
|
1662
|
+
```typescript jsx
|
|
1663
|
+
export default (
|
|
1664
|
+
<server>
|
|
1665
|
+
<api>
|
|
1666
|
+
<endpoint method='get' path='/users'>
|
|
1667
|
+
<param
|
|
1668
|
+
in='query'
|
|
1669
|
+
name='search'>
|
|
1670
|
+
<any default={null} />
|
|
1671
|
+
</param>
|
|
1672
|
+
</endpoint>
|
|
1673
|
+
</api>
|
|
1674
|
+
</server>
|
|
1675
|
+
)
|
|
1676
|
+
```
|
|
1677
|
+
|
|
1678
|
+
#### example
|
|
1679
|
+
|
|
1680
|
+
An example value.
|
|
1681
|
+
|
|
1682
|
+
*src/app.tsx*
|
|
1683
|
+
```typescript jsx
|
|
1684
|
+
export default (
|
|
1685
|
+
<server>
|
|
1686
|
+
<api>
|
|
1687
|
+
<endpoint method='get' path='/products'>
|
|
1688
|
+
<param
|
|
1689
|
+
in='query'
|
|
1690
|
+
name='active'>
|
|
1691
|
+
<any example={false} />
|
|
1692
|
+
</param>
|
|
1693
|
+
</endpoint>
|
|
1694
|
+
</api>
|
|
1695
|
+
</server>
|
|
1696
|
+
)
|
|
1697
|
+
```
|
|
1698
|
+
|
|
1699
|
+
#### description
|
|
1700
|
+
|
|
1701
|
+
A description of the `any`.
|
|
1702
|
+
|
|
1703
|
+
*src/app.tsx*
|
|
1704
|
+
```typescript jsx
|
|
1705
|
+
export default (
|
|
1706
|
+
<server>
|
|
1707
|
+
<api>
|
|
1708
|
+
<endpoint method='get' path='/products'>
|
|
1709
|
+
<param
|
|
1710
|
+
in='query'
|
|
1711
|
+
name='active'>
|
|
1712
|
+
<any
|
|
1713
|
+
description='Active products param'
|
|
1714
|
+
/>
|
|
1715
|
+
</param>
|
|
1716
|
+
</endpoint>
|
|
1717
|
+
</api>
|
|
1718
|
+
</server>
|
|
1719
|
+
)
|
|
1720
|
+
```
|
|
1721
|
+
|
|
1722
|
+
### \<null>
|
|
1723
|
+
|
|
1724
|
+
[← back](#primitive-data)
|
|
1725
|
+
|
|
1726
|
+
The element MUST be placed inside one of [\<response>](#response), [\<param>](#param), [\<body>](#body).
|
|
1727
|
+
It defines `null` value for a parent element.
|
|
1728
|
+
`@innet/server` formats and validate the value automatically (real-time).
|
|
1729
|
+
|
|
1730
|
+
*src/app.tsx*
|
|
1731
|
+
```typescript jsx
|
|
1732
|
+
export default (
|
|
1733
|
+
<server>
|
|
1734
|
+
<api>
|
|
1735
|
+
<endpoint method='get' path='/todos'>
|
|
1736
|
+
<param
|
|
1737
|
+
in='query'
|
|
1738
|
+
name='search'>
|
|
1739
|
+
<null />
|
|
1740
|
+
</param>
|
|
1741
|
+
</endpoint>
|
|
1742
|
+
</api>
|
|
1743
|
+
</server>
|
|
1744
|
+
)
|
|
1745
|
+
```
|
|
1746
|
+
|
|
1747
|
+
#### description
|
|
1748
|
+
|
|
1749
|
+
A description of the `null`.
|
|
1750
|
+
|
|
1751
|
+
*src/app.tsx*
|
|
1752
|
+
```typescript jsx
|
|
1753
|
+
export default (
|
|
1754
|
+
<server>
|
|
1755
|
+
<api>
|
|
1756
|
+
<endpoint method='get' path='/products'>
|
|
1757
|
+
<param
|
|
1758
|
+
in='query'
|
|
1759
|
+
name='active'>
|
|
1760
|
+
<null description='FIXME!' />
|
|
1761
|
+
</param>
|
|
1762
|
+
</endpoint>
|
|
1763
|
+
</api>
|
|
1764
|
+
</server>
|
|
1765
|
+
)
|
|
1766
|
+
```
|
|
1767
|
+
|
|
1631
1768
|
### \<boolean>
|
|
1632
1769
|
|
|
1633
1770
|
[← back](#primitive-data)
|
package/package.json
CHANGED