|
| 1 | +import {Callout, Steps} from "nextra/components" |
| 2 | + |
| 3 | +# Roadmap |
| 4 | +This is a **very** loosely ordered view of known things that are planned in the roadmap. It's probably not exhaustive. |
| 5 | + |
| 6 | +## Near-term - "Sometime in the next 6 months" |
| 7 | +These are broadly speaking the known blockers to doing the first v1 release. |
| 8 | + |
| 9 | +<Callout emoji="💡"> |
| 10 | + |
| 11 | + The project was started [approximately July |
| 12 | + 2020](https://github.com/mnahkies/openapi-code-generator/commit/643a06835bfb6e462fdeb31f5432cac5ef8ef7f5), over 4 |
| 13 | + years ago. |
| 14 | + |
| 15 | + It'd be really nice to get to a v1 / stable release before it turns 5 years old 😅, so we'll aim for this to happen |
| 16 | + approximately Q1/Q2 of 2025. |
| 17 | + |
| 18 | +</Callout> |
| 19 | + |
| 20 | +<Steps> |
| 21 | + ### Support multipart/form-data (file uploads) |
| 22 | + |
| 23 | + Currently only `application/json` request bodies are supported properly. |
| 24 | + |
| 25 | + This is particularly problematic when wanting to upload files, such as images |
| 26 | + or videos. |
| 27 | + |
| 28 | + Adding `multipart/form-data` support will aim to solve this. |
| 29 | + |
| 30 | + ref: https://spec.openapis.org/oas/v3.1.1.html#considerations-for-file-uploads |
| 31 | + |
| 32 | + ### Support response headers |
| 33 | + |
| 34 | + It's common for important metadata, such as rate limit information to be |
| 35 | + communicated using response headers. |
| 36 | + |
| 37 | + At the moment this information is lost during code generation, adding support |
| 38 | + will mean that it is typed and validated at runtime. |
| 39 | + |
| 40 | + ref: https://spec.openapis.org/oas/v3.1.1.html#response-object |
| 41 | + |
| 42 | + ### Support cookie parameters |
| 43 | + |
| 44 | + Cookies are often used to store small pieces of information to be sent on every |
| 45 | + request. These are currently ignored, but should be supported. |
| 46 | + |
| 47 | + ### Review handling of parameter `style` |
| 48 | + |
| 49 | + Review and improve the way that parameter `style` is interpreted. |
| 50 | + |
| 51 | + ref: https://spec.openapis.org/oas/v3.1.1.html#style-values |
| 52 | + |
| 53 | + ### Fix interpretation of `readOnly` / `writeOnly` |
| 54 | + |
| 55 | + The meaning of these attributes was incorrectly interpreted and implemented. Changing this will |
| 56 | + be a breaking change, so this should be revisited prior to v1. |
| 57 | + |
| 58 | + ### Clean up / rethink CLI options |
| 59 | + |
| 60 | + As the number of CLI options has grown, it's been a bit confusing around when options are/aren't |
| 61 | + used, and it's not super clear how languages other than `typescript` might be introduced. |
| 62 | + |
| 63 | + We should have a rethink of this, and probably separate client sdk vs server stubs in the option |
| 64 | + structure to make it clear when args are applicable. |
| 65 | + |
| 66 | + It may be difficult to maintain backwards compatibility, but if possible then we should. |
| 67 | + |
| 68 | +</Steps> |
| 69 | + |
| 70 | +## Mid-term - "Hopefully in the next year" |
| 71 | +These are items that are nice to have, but generally not breaking and therefore not blocking for a v1 |
| 72 | +release. There's a decent chance that many of these will beat a v1 release still. |
| 73 | + |
| 74 | +<Steps> |
| 75 | + ### Implement a `typescript-express` template |
| 76 | + |
| 77 | + [express](https://www.npmjs.com/package/express) is probably still the most popular |
| 78 | + web framework for nodejs, with approximately 10x more weekly downloads than `koa` |
| 79 | + |
| 80 | + It's also pretty similar in design to `koa`, and so it should low-effort to add a |
| 81 | + template for it. |
| 82 | + |
| 83 | + This would be beneficial in terms of making the project useful to a wider userbase, |
| 84 | + but also be a forcing function to tidy up the koa template code, and abstract it in |
| 85 | + a similar way to the client templates are. |
| 86 | + |
| 87 | + ### Complete an interactive playground |
| 88 | + |
| 89 | + Many tools of this genre offer an interactive playground on their documentation sites, |
| 90 | + to better communicate the tools purpose and features. |
| 91 | + |
| 92 | + An interactive playground PR has been up for a while, https://github.com/mnahkies/openapi-code-generator/pull/216 |
| 93 | + but it turns out these are hard to build, and it needs some more effort to get over the line. |
| 94 | + |
| 95 | + ### Support custom serialization/deserialization |
| 96 | + |
| 97 | + Sometimes you want to serialize or deserialize objects in a custom way. Good examples |
| 98 | + might be parsing `date-time` strings as a `moment` / `Instant` instead of the native `Date`, |
| 99 | + or parsing a `uuid` string to a first class `Uuid` type. |
| 100 | + |
| 101 | + https://github.com/mnahkies/openapi-code-generator/pull/220 starts to explore this idea, |
| 102 | + and how we could potentially make use of a custom extension to facilitate this use-case. |
| 103 | + |
| 104 | + ### Implement a `typescript-next` template |
| 105 | + |
| 106 | + [next.js](https://nextjs.org/) is a popular framework for building site using `react`. |
| 107 | + An experimental template has been up here https://github.com/mnahkies/openapi-code-generator/pull/152 |
| 108 | + for months, but it needs some effort to really nail the user experience. |
| 109 | + |
| 110 | + This is coming after an `typescript-express` template, as producing the former will |
| 111 | + necessitate several important refactorings that will make this easier to achieve. |
| 112 | + |
| 113 | + ### Explore test framework integrations |
| 114 | + |
| 115 | + [nock](https://www.npmjs.com/package/nock) is a popular library for mocking http requests |
| 116 | + in test suites. What would an integration with `nock` look like? Or maybe mock service worker? |
| 117 | + |
| 118 | + Could we leverage examples to create fixture factories? |
| 119 | + |
| 120 | + ### Support Security Schemas |
| 121 | + |
| 122 | + At the moment we ignore security schemas, and expect the user to handle this themselves |
| 123 | + out of band of the code generation. |
| 124 | + |
| 125 | + For example by mounting a custom authentication middleware for Koa servers, or passing |
| 126 | + an `Authorization` header for client SDKs. |
| 127 | + |
| 128 | + It would be good to investigate how to improve things using declared security schemes. |
| 129 | + |
| 130 | + ref: https://spec.openapis.org/oas/v3.1.1.html#security-scheme-object-0 |
| 131 | + |
| 132 | +</Steps> |
| 133 | + |
| 134 | +## Long-term - "One Day" |
| 135 | +This is a set of possible future enhancements, generally covering more niche/uncommon parts |
| 136 | +of the OpenAPI standard, that we _might_ implement one day. |
| 137 | + |
| 138 | +Whilst these are lower down the list due to being uncommon (often appearing 0 times in the range of |
| 139 | +integration tests we currently run), there's also an argument to be made that unless tooling steps up |
| 140 | +to support these features, then adoption will remain low, and so support should be added regardless. |
| 141 | + |
| 142 | +<Steps> |
| 143 | + |
| 144 | + ### Support XML |
| 145 | + |
| 146 | + Whilst JSON has broadly gained popularity over XML as a markup for HTTP requests, |
| 147 | + XML isn't dead. It would be good to support it, especially for client SDK's where |
| 148 | + a server might not support JSON. |
| 149 | + |
| 150 | + ref: https://spec.openapis.org/oas/v3.1.1.html#xml-object |
| 151 | + |
| 152 | + ### Support `webhooks` |
| 153 | + The `webhooks` object is a new way to declare webhooks in 3.1. We should investigate |
| 154 | + supporting it. |
| 155 | + |
| 156 | + ref: https://learn.openapis.org/examples/v3.1/webhook-example.html |
| 157 | + |
| 158 | + ### Support `links` |
| 159 | + |
| 160 | + The `links` object on responses is an interesting mechanism to declare relationships |
| 161 | + between operations, and how to traverse these, using a static declaration. |
| 162 | + |
| 163 | + It essentially allows you to specify a mapping of properties from one request, to be |
| 164 | + parameters for another request. Eg: `$request.path.id` |
| 165 | + |
| 166 | + Whilst interesting, it's also uncommon - currently there isn't a single usage of this |
| 167 | + feature in the specifications we use for our integration tests. |
| 168 | + |
| 169 | + ref: https://spec.openapis.org/oas/v3.1.1.html#link-object |
| 170 | + |
| 171 | + ### Support `callbacks` |
| 172 | + |
| 173 | + The `callbacks` field of an operation is similar to the `links` response object, in that |
| 174 | + it provides a way to specify callbacks related to an operation. |
| 175 | + |
| 176 | + Much like `links`, it's uncommon to see this used in practice, without a single `callbacks` |
| 177 | + object defined in any specifications we see. |
| 178 | + |
| 179 | + ref: https://spec.openapis.org/oas/v3.1.1.html#callback-object |
| 180 | +</Steps> |
0 commit comments