Commit 3eacb9c
authored
Add deprecated annotations on shorthand functions for deprecated operations (#384)
### Motivation
If an operation is marked as deprecated in the OpenAPI document then the
generated protocol requirement is annotated as deprecated. However, the
shorthand overload for this function, in the protocol extension, was
missing this annotation.
### Modifications
Add deprecated annotation to the generated function in the protocol
extension for deprecated API operations.
### Result
If an operation is marked as deprecated in the OpenAPI document then
both variants of the generated function (the protocol requirement _and_
the protocol extension) are annotated as deprecated.
### Test Plan
Updated the snippet test to include a path with one deprecated operation
and one non-deprecated operation.
### Related Issues
- Fixes #367.1 parent 577bafd commit 3eacb9c
File tree
2 files changed
+31
-23
lines changed- Sources/_OpenAPIGeneratorCore/Translator/TypesTranslator
- Tests/OpenAPIGeneratorReferenceTests
2 files changed
+31
-23
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
| |||
Lines changed: 26 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1868 | 1868 | | |
1869 | 1869 | | |
1870 | 1870 | | |
1871 | | - | |
1872 | | - | |
1873 | | - | |
1874 | | - | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
1875 | 1874 | | |
1876 | | - | |
| 1875 | + | |
| 1876 | + | |
1877 | 1877 | | |
1878 | 1878 | | |
1879 | 1879 | | |
1880 | 1880 | | |
1881 | 1881 | | |
1882 | 1882 | | |
1883 | 1883 | | |
1884 | | - | |
1885 | | - | |
1886 | | - | |
1887 | | - | |
1888 | | - | |
1889 | | - | |
1890 | | - | |
1891 | | - | |
1892 | | - | |
1893 | | - | |
1894 | | - | |
1895 | | - | |
1896 | | - | |
| 1884 | + | |
1897 | 1885 | | |
1898 | | - | |
| 1886 | + | |
1899 | 1887 | | |
1900 | 1888 | | |
1901 | 1889 | | |
1902 | 1890 | | |
1903 | 1891 | | |
1904 | 1892 | | |
1905 | 1893 | | |
1906 | | - | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
1907 | 1907 | | |
1908 | 1908 | | |
1909 | | - | |
1910 | | - | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
1911 | 1915 | | |
1912 | 1916 | | |
1913 | 1917 | | |
| |||
0 commit comments