Question: Is there a way to generate a server from an existing swagger json file?

Asked By
Asked At
2018-03-07 12:10:01

Found 15 possible answers.

User Answered At Possible Answer
daveliepmann 2018-03-07 13:21:03 @mmer See (though I've always worked in the other direction)
mmer 2018-03-07 13:21:58 Thanks
jmckitrick 2018-03-11 14:55:25 I recently pitched our CTO on the value of spec, and I see that compojure-api 2.0.0 will use spec for coercion and validation. I’d rather not start with prismatic schema then migrate to spec. Is there a timeline on a release? Or is the alpha branch usable for small webservice projects?
juhoteperi 2018-03-11 15:09:08 @jmckitrick Yes, it is stable. We are using C-api 2.0 on production on several projects. It is alpha is due to spec being alpha, but C-api itself is stable and probably won't change much.
jmckitrick 2018-03-11 15:17:46 That’s good news, @juhoteperi I assume the migration guide is current? I’m trying some of these technologies for the first time, so I’m hoping a Luminus project can be easily upgraded to 2.0 for a POC. Was it a challenge moving from ring-middleware-format to Muuntaja?
juhoteperi 2018-03-11 15:30:28 If you don't set any r-m-f options, you probably don't need to do anything. If you have some r-m-f options ( :format on defapi/api ) you need to update those.
jmckitrick 2018-03-12 15:01:28 I started with a Luminus project, and I’m trying to upgrade to compojure-api 2.0.0 and I’m getting compilation errors related to Muuntaja I’ve noticed that the Tutorial seems to stop after page 1, and the next article ‘Apis & options’ does not exist.
csm 2018-03-13 19:46:23 I seem to be missing something; I’ve tried adding :formats (assoc-in muuntaja.core/default-options [:formats "text/csv"] {:encoder csv-encoder}) to the arg-map to compojure.api.api/api , but I still get JSON back when trying Accept: text/csv (2.0.0-alpha18) nevermind, I see my mistake
ikitommi 2018-03-14 11:42:12 @jmckitrick the docs are really lame at the moment. Would need a full rewrite. Sadly, too busy to do that atm. If someone has good idea (and time :)) how to rewrite a good docs site, we are all ears. and the alpha-19 is out for compojure-api, few merged PRs for async coercion, spec-tools integration etc. back from vacation, could check what’s up with that. @jmckitrick what errors do you get from Luminus? Could you publish a small example site to github?
jmckitrick 2018-03-14 11:46:44 @ikitommi Good to hear from you! Let me try my branch again with alpha-19 If I understand correctly, I should not use defapi anymore, correct? So I’m starting with a Luminus base with services declared. But to get everything to compile, I’m commenting out most of that namespace.
ikitommi 2018-03-14 11:58:52 yes, that’s removed. Just functions + support for the current Compojure macros.
jmckitrick 2018-03-14 11:59:33 Is still accurate ATM? I’m coming from plain-vanilla compojure, and I want to get to compojure-api with spec validation. So I need to skip a step, I think.
ikitommi 2018-03-14 12:01:19 ping @miikka for the migration docs
miikka 2018-03-14 12:17:21 Ah, they should be approximately correct, but I should go through them and check that they're up to date. I'll try to do it later today/tomorrow.
jmckitrick 2018-03-14 13:03:51 Specifically, there are broken links in the Wiki for ‘Apis & Options’ and ‘Authentication and authorization’ Basically, I want a platform for Clojure web services and apps for a new Clojure team, and I’d like it to work with spec. Which it does now. When would I need the more advanced features, like Muuntaja offers? The migration docs seem ok so far.

Related Questions