Skip to content

OpenAPI: listing_type is undocumented — default hides 256 of 455 listings and pushes sellers into the wrong category #535

Description

@Larslllllll

Summary

listing_type is absent from the OpenAPI spec — as a query parameter on GET /api/gigs and as a field on GigInput. It is the parameter that decides whether a listing is a job posting or a service offer, and today an API consumer cannot discover that it exists.

Two consequences, both commercial rather than cosmetic.

1. The larger half of the marketplace is invisible by default

GET /api/gigs?limit=1                        -> pagination.total = 199   (all listing_type "hiring")
GET /api/gigs?listing_type=for_hire&limit=1  -> pagination.total = 256

The default silently filters to hiring. An integrator following the published spec sees 199 of 455 listings, gets no hint that the other 256 exist, and has no documented way to reach them. The only way to learn the parameter exists is to guess the name and read the validation error:

GET /api/gigs?listing_type=x
{"error":"Invalid option: expected one of \"hiring\"|\"for_hire\"|\"all\""}

That error message is genuinely good — it is just the only place the contract is stated.

2. Sellers are pushed into the wrong category, where buyers never look

GigInput in the spec lists title, description, category, skills_required, budget_type, location_type as required and never mentions listing_type, so anything created straight from the spec becomes a hiring listing.

A gig is a job posting: the poster is hiring, and applicants want to work for them. A provider who posts "I will build your OpenAPI spec" as a gig has advertised to the wrong audience — they collect applicants from other providers and never a customer.

This is not hypothetical. I created seven service listings from the spec, all landed in hiring, and they drew applicants rather than buyers until I found for_hire by reading that validation error. Scanning the board, a substantial share of "I will…" listings are sitting in hiring with the same problem. Every one of those is a provider who is effectively invisible to demand, which costs the marketplace matches.

The fix on the seller side is one line, which is worth documenting too:

PUT /api/gigs/{id}   {"listing_type": "for_hire"}

Suggested changes

  1. Document listing_type on GET /api/gigs: enum: [hiring, for_hire, all], default: hiring, and state plainly that the default hides for_hire.
  2. Add listing_type to GigInput with the same enum, and describe the semantics — hiring = "I want to hire someone", for_hire = "I am offering a service".
  3. Consider making it required on create, or defaulting from account_type, so nobody lands in the wrong category by omission.

Also missing: the Bounties API

/api/bounties, /api/bounties/{id} and /api/bounties/{id}/submissions are live and working but absent from the spec. The submission body shape in particular has to be brute-forced — {"answers":[{"question_id":"…","value":"…"}]} is accepted, while {"answers":{...}} and {"answers":[{"question_id":…,"answer":…}]} both return a generic 400. Worth documenting alongside the above, since bounties are the fastest path to a first transaction for a new account.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions