summaryrefslogtreecommitdiff
path: root/internal/api/model/poll.go
AgeCommit message (Collapse)AuthorFiles
2024-03-06[bugfix] Fix Swagger spec and add test script (#2698)Libravatar Vyr Cossont1
* Add Swagger spec test script * Fix Swagger spec errors not related to statuses with polls * Add API tests that post a status with a poll * Fix creating a status with a poll from form params * Fix Swagger spec errors related to statuses with polls (this is the last error) * Fix Swagger spec warnings not related to unused definitions * Suppress a duplicate list update params definition that was somehow causing wrong param names * Add Swagger test to CI - updates Drone config - vendorizes go-swagger - fixes a file extension issue that caused the test script to generate JSON instead of YAML with the vendorized version * Put `Sample: ` on its own line everywhere * Remove unused id param from emojiCategoriesGet * Add 5 more pairs of profile fields to account update API Swagger * Remove Swagger prefix from dummy fields It makes the generated code look weird * Manually annotate params for statusCreate operation * Fix all remaining Swagger spec warnings - Change some models into operation parameters - Ignore models that already correspond to manually documented operation parameters but can't be trivially changed (those with file fields) * Documented that creating a status with scheduled_at isn't implemented yet * sign drone.yml * Fix filter API Swagger errors * fixup! Fix filter API Swagger errors --------- Co-authored-by: tobi <tobi.smethurst@protonmail.com>
2023-12-12[bugfix] poll vote count fixes (#2444)Libravatar kim1
* don't drop all vote counts if hideCounts is set, refactors poll option extraction slightly * omit voters_count when not set * make voters_count a ptr to ensure it is omit unless definitely needed * handle case of expires_at, voters_count and option.votes_count being nilable * faster isNil check * remove omitempty tags since mastodon API marks things as nullable but still sets them in outgoing json
2023-11-22[bugfix/chore] id poll options properly (#2379)Libravatar tobi1
* aria-labels for polls, id poll options properly * my bad, aria labels are for interactive elements
2023-11-22[feature] Poll web view (#2377)Libravatar tobi1
* [feature] Render polls nicely on the web view * use figure for poll, other small tweaks * reverse share + count (lines up better) * poll options list entries * fix up some remaining things
2023-11-10[chore/bugfix/horror] Allow `expires_in` and poll choices to be parsed from ↵Libravatar tobi1
strings (#2346)
2023-11-09[bugfix/docs] Poll api fixups + swagger docs (#2345)Libravatar tobi1
2023-11-08[feature] add support for polls + receiving federated status edits (#2330)Libravatar kim1
2023-03-12[chore] Improve copyright header handling (#1608)Libravatar Daenney1
* [chore] Remove years from all license headers Years or year ranges aren't required in license headers. Many projects have removed them in recent years and it avoids a bit of yearly toil. In many cases our copyright claim was also a bit dodgy since we added the 2021-2023 header to files created after 2021 but you can't claim copyright into the past that way. * [chore] Add license header check This ensures a license header is always added to any new file. This avoids maintainers/reviewers needing to remember to check for and ask for it in case a contribution doesn't include it. * [chore] Add missing license headers * [chore] Further updates to license header * Use the more common // indentend comment format * Remove the hack we had for the linter now that we use the // format * Add SPDX license identifier
2023-01-05[chore] Update/add license headers for 2023 (#1304)Libravatar tobi1
2021-12-20Extend license notices to 2022 (#354)Libravatar tobi1
2021-08-02Frodo swaggins (#126)Libravatar Tobi Smethurst1
* more swagger fun * document a whole bunch more stuff * more swagger yayyyyyyy * progress + go fmt
2021-07-31Swagger (#124)Libravatar Tobi Smethurst1
* start experimenting with swagger documentation * further adventures in swagger * do a few more api paths * account paths documented * go fmt * fix up some models * bit o lintin'
2021-05-08Ap (#14)Libravatar Tobi Smethurst1
Big restructuring and initial work on activitypub