Coder Social home page Coder Social logo

Comments (13)

nkumar-topcoder avatar nkumar-topcoder commented on August 21, 2024

@maxceem can you pls take a look this.

from taas-apis.

maxceem avatar maxceem commented on August 21, 2024

I had a look, understood the issue, and would update with details tomorrow.

from taas-apis.

maxceem avatar maxceem commented on August 21, 2024

Internally GET /taas-teams endpoint calls Projects API GET /projects.
Projects API support sorting, pagination, and filtering by name: https://api.topcoder-dev.com/v5/projects/?sort=lastActivityAt+desc&perPage=20&page=1&name=*test*.

  1. GET /taas-teams should support pagination params page and perPage (pass to Projects API).

  2. GET /taas-teams should support sorting params sortBy and sortOrder and pass them to Projects API in one param sort as sort=<sortBy>+<sortOrder>

  3. GET /taas-teams should support filtering param name and pass it to Projects API

  4. Make sure that all these params work as per the description above and I didn't miss anything.

  5. Update API documentation: Swagger, Potman.

FYI @nkumar-topcoder

from taas-apis.

maxceem avatar maxceem commented on August 21, 2024

@imcaizheng you may pick it up if it looks good for you.

from taas-apis.

imcaizheng avatar imcaizheng commented on August 21, 2024

PR created #44

from taas-apis.

maxceem avatar maxceem commented on August 21, 2024

Contest https://www.topcoder.com/challenges/30156198 has been created for this ticket.

This is an automated message for maxceem via Topcoder X

from taas-apis.

maxceem avatar maxceem commented on August 21, 2024

Contest https://www.topcoder.com/challenges/30156198 has been updated - it has been assigned to aaron2017.

This is an automated message for maxceem via Topcoder X

from taas-apis.

maxceem avatar maxceem commented on August 21, 2024

Works good.

The only thing, I guess we shouldn't add result when we return arrays in the response because as per swagger we have to return arrays of records directly, like:

[
  {},
   ...
  {}
]

instead of

{ 
   result: [
     {},
      ...
     {}
   ]
}

So I removed result for all the "list" endpoints f3328f7

@imcaizheng please, let me know if I missed something, and we should handle it another way, rather than removing result.

from taas-apis.

imcaizheng avatar imcaizheng commented on August 21, 2024

@maxceem other operations such as GET /jobs, GET /jobCandidates and GET /resourceBookings return data with the result field, I think it may make API clients a little happy by letting GET /taas-teams to return data the same way, also considering the taas-teams endpoints were developed after the jobs, jobCandidates and resourceBookings endpionts. I would prefer to change the swagger spec instead if it is not too late to do that.

from taas-apis.

maxceem avatar maxceem commented on August 21, 2024

Thanks, @imcaizheng.

@nkumar-topcoder as per swagger and implementation all list endpoints return data in result field:

image

While endpoints which return single records, return data directly without result field:

image

Also, other Topcoder V5 API return all the data without result field in the response. For example Challenges API:

image

Do you know if there was some intention behind adding result for the "list" endpoints or this happened unintentionally?
Also, I think Topcoder API V5 guidelines require to return data directly.

from taas-apis.

nkumar-topcoder avatar nkumar-topcoder commented on August 21, 2024

@maxceem
not sure , @veshu can help us here. pls reach out to him (offline on slack).
feel free to implement as deemed fit. thanks

from taas-apis.

maxceem avatar maxceem commented on August 21, 2024

Ok, I believe there should not be result in responses, so I've removed it in endpoints and in Swagger.

from taas-apis.

maxceem avatar maxceem commented on August 21, 2024

Payment task has been updated: https://software.topcoder.com/review/actions/ViewProjectDetails?pid=30156198

This is an automated message for maxceem via Topcoder X

from taas-apis.

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.