GithubHelp home page GithubHelp logo

Comments (4)

johan-bjareholt avatar johan-bjareholt commented on June 18, 2024 1

@xylix That openapi branch look really nice, I took the liberty of taking the aw-models code and modified it a little since that part looked pretty good already. I only changed your schema generation of Duration which was kind of strange.

#159

It's OK if everything is not finished, let's take it in small steps.

from aw-server-rust.

johan-bjareholt avatar johan-bjareholt commented on June 18, 2024

Oh, didn't know it was that easy.

The only reason why I said it shouldn't be implemented is because rocket+serde (our HTTP lib + JSON (de)serializer) cannot export JSON schemas so we would have to do duplicate work managing both. Not really a big deal, but less ideal than how simple it is with flask-restplus.

from aw-server-rust.

xylix avatar xylix commented on June 18, 2024

I started implementing an automated swagger spec using rust crate rokapi. Basically the implementation requires us to add JsonSchema macro to most endpoint, and use a bit less custom status messages etc. It's very WIP so I'm not opening a PR yet but I think the support is doable, with some minor changes on our endpoints etc.

master...xylix:dev/openapi-spec-rokapi

from aw-server-rust.

xylix avatar xylix commented on June 18, 2024

Right I didn't actually remember to mention it here but I tried it again a couple weeks ago: master...xylix:openapi-spec . There's still some weirdness especially with getting custom HTTP returns to serialize / spec correctly.

But #159 looks good.

from aw-server-rust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.