Skip to content

Commit a6cc4f0

Browse files
Ian ZelikmanIan Zelikman
authored andcommitted
Merge branch 'master' of github.com:tylerdave/OpenAPI-Tutorial
2 parents 58223cd + 4f3a00e commit a6cc4f0

File tree

2 files changed

+364
-26
lines changed

2 files changed

+364
-26
lines changed

presentation/presentation.html

Lines changed: 182 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,6 @@
169169
???
170170
- If you don't have the prerequisites installed yet, you should be following the directions to do so now.
171171
- Once do, we'd like you to verify that they're working.
172-
- You can do this by first opening TODO: directions for editor
173-
- Then run TODO: directions for CLI test
174172

175173
---
176174

@@ -1570,9 +1568,15 @@
15701568

15711569
---
15721570

1573-
class: center, padded-top
1571+
class: center, middle, section-title
15741572

15751573
# Code Generation
1574+
1575+
---
1576+
1577+
class: center, padded-top
1578+
1579+
# Code Generators
15761580
--
15771581

15781582
## Servers
@@ -1582,14 +1586,14 @@
15821586

15831587
---
15841588

1585-
class: center
1589+
class: center, padded-top
15861590

15871591
# Swagger-Codegen
15881592
--
15891593

15901594
## Via editor
15911595

1592-
`https://generator.swagger.io/`
1596+
Calls to `https://generator.swagger.io/`
15931597
--
15941598

15951599
## Via CLI
@@ -1598,6 +1602,21 @@
15981602

15991603
---
16001604

1605+
class: center
1606+
1607+
# Integrated Frameworks
1608+
--
1609+
1610+
## Swagger Inflector (Java)
1611+
--
1612+
1613+
## swagger-node (Node.js)
1614+
--
1615+
1616+
## Connexion (Python)
1617+
1618+
---
1619+
16011620
class: lesson
16021621

16031622
# Lesson 2.01: Automatic Code Generation
@@ -1700,6 +1719,164 @@
17001719

17011720
---
17021721

1722+
class: center, middle, section-title
1723+
1724+
# Connexion
1725+
1726+
---
1727+
1728+
class: center, padded-top
1729+
1730+
# Connexion
1731+
--
1732+
1733+
## Python + Flask
1734+
--
1735+
1736+
## Spec as configuration
1737+
--
1738+
1739+
## Routing, validation, etc.
1740+
--
1741+
1742+
---
1743+
1744+
class: center
1745+
1746+
# Explicit Routing
1747+
--
1748+
1749+
### Explicit Function Name
1750+
1751+
```
1752+
paths:
1753+
/hello_world:
1754+
post:
1755+
operationId: myapp.api.hello_world
1756+
```
1757+
--
1758+
1759+
### Separate Controller Name
1760+
1761+
```
1762+
paths:
1763+
/hello_world:
1764+
post:
1765+
x-swagger-router-controller: myapp.api
1766+
operationId: hello_world
1767+
```
1768+
1769+
---
1770+
1771+
class: center, padded-top
1772+
1773+
# Automatic Routing
1774+
--
1775+
1776+
```
1777+
from connexion.resolver import RestyResolver
1778+
1779+
app = connexion.FlaskApp(__name__)
1780+
app.add_api('swagger.yaml', resolver=RestyResolver('api'))
1781+
```
1782+
1783+
---
1784+
1785+
class: center
1786+
1787+
## Automatic Route Resolution
1788+
1789+
```
1790+
paths:
1791+
/:
1792+
get:
1793+
# Implied operationId: api.get
1794+
/foo:
1795+
get:
1796+
# Implied operationId: api.foo.search
1797+
post:
1798+
# Implied operationId: api.foo.post
1799+
'/foo/{id}':
1800+
get:
1801+
# Implied operationId: api.foo.get
1802+
put:
1803+
# Implied operationId: api.foo.put
1804+
copy:
1805+
# Implied operationId: api.foo.copy
1806+
delete:
1807+
# Implied operationId: api.foo.delete
1808+
```
1809+
1810+
---
1811+
1812+
class: center, padded-top
1813+
1814+
# Request Validation
1815+
--
1816+
1817+
## JSON Schema
1818+
--
1819+
1820+
### Required parameters
1821+
--
1822+
1823+
### Types and Formats
1824+
--
1825+
1826+
## Custom Validators
1827+
--
1828+
1829+
## HTTP 400 w/ Details
1830+
1831+
---
1832+
1833+
class: center, padded-top
1834+
1835+
# Response Handling
1836+
--
1837+
1838+
## Serialization
1839+
--
1840+
1841+
## JSON Encoder
1842+
--
1843+
1844+
## Validation Optional
1845+
--
1846+
1847+
## Custom Validators
1848+
1849+
---
1850+
1851+
class: center, padded-top2
1852+
1853+
# Security
1854+
--
1855+
1856+
## OAuth 2 via Spec
1857+
--
1858+
1859+
## API Key & Basic Unsupported
1860+
--
1861+
1862+
---
1863+
1864+
class: center, padded-top2
1865+
1866+
# Other Features
1867+
--
1868+
1869+
## Swagger UI
1870+
--
1871+
1872+
## Swagger JSON
1873+
--
1874+
1875+
## Flask Integration
1876+
--
1877+
1878+
---
1879+
17031880
class: lesson
17041881

17051882
# Lesson 2.02: Run the API
@@ -2182,14 +2359,6 @@
21822359
# Thank You!
21832360
--
21842361

2185-
## *Please* leave feedback
2186-
2187-
### 3-question survey:
2188-
2189-
.black-text[
2190-
`TODO: Feedback URL`
2191-
]
2192-
21932362
## Questions?
21942363
<div style="width: 100%;">
21952364
<div style="width: 50%; float: left; display: inline-block;">

0 commit comments

Comments
 (0)