Coder Social home page Coder Social logo

Comments (3)

kylerjensen avatar kylerjensen commented on April 27, 2024

It looks like the problem is with the nested colors property of the Institution interface. The above works if I create a new interface, InstitutionColors and change colors: {...} to colors: InstitutionColors. The framework should be able to take care of this for me.

from tsoa.

Dirrk avatar Dirrk commented on April 27, 2024

The framework should be able to take care of this for me.

@Kjens93, personally I would disagree that any framework should declare your interfaces for you.

This library allows you to declare your interfaces, and then it uses that metadata to automate the routes/swagger definition.

While its very possible for it to do it for you, wouldn't you want to be notified if you didn't declare your interface properly? In particular with this library, you are declaring the contract for other developers to use. Wouldn't it make more sense to have a InstitutionColors interface/class that can be modified in one place that updates all requests/responses that use it?

Just my opinion tho.

from tsoa.

lukeautry avatar lukeautry commented on April 27, 2024

I think this is a valid issue. There's an issue open for it currently: #50

I've been meaning to get to this. Will hopefully have a fix in the next week or so.

from tsoa.

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.