Code Monkey home page Code Monkey logo

Comments (7)

G4brym avatar G4brym commented on June 15, 2024 4

Closing this issue, has we have now fully migrated to itty-router 4.x
Thanks @kwhitley 😄

from itty-router-openapi.

G4brym avatar G4brym commented on June 15, 2024 1

Also, are you thinking in adding support for class-based endpoints in itty-router (core)?
like what we got in here

import { OpenAPIRoute, Query, Int, Str } from '@cloudflare/itty-router-openapi'

export class ToDoList extends OpenAPIRoute {
  static schema = {...}

  async handle(request: Request, data: Record<string, any>) {
    const { page } = data

    return {
      currentPage: page,
      nextPage: page + 1,
      results: ['lorem', 'ipsum'],
    }
  }
}

from itty-router-openapi.

G4brym avatar G4brym commented on June 15, 2024

Hey @kwhitley thanks for posting this here
I wasn't aware of such update coming to itty-router (core), we will do tests to ensure everything will work on this newer version and update our documentation as soon as possible

Thanks 😃

from itty-router-openapi.

kwhitley avatar kwhitley commented on June 15, 2024

Nah, that's out of scope for itty (at least for right now), so definitely on you guys :)

I'd be happy to explore it down the road though!

I'm pretty confident I just nailed the re-typing of itty, so all the latest can be found here, and hopefully we'll be looking at a final release (and off the next tag) in a day or two. Just finalizing the docs, and trying to get eyes/testers on it!

Main v4.x docs
https://itty.dev/itty-router

Types
https://itty.dev/itty-router/typescript

from itty-router-openapi.

kwhitley avatar kwhitley commented on June 15, 2024

Btw, I'd love a simple example demo/description for this project (using the v4 itty-router@next) syntax - I'll add it to the docs with a link back to your full documentation :)

from itty-router-openapi.

G4brym avatar G4brym commented on June 15, 2024

Hey @kwhitley the upgrade to itty-router 4.x will take a while from our library, we are planning to bundle it with a lot of changes

from itty-router-openapi.

kwhitley avatar kwhitley commented on June 15, 2024

I submitted a PR just now (#60) with the minimal impact inclusion if you're interested :)

from itty-router-openapi.

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.