Robert Vollmert and Steve Chávez
30d5a81156
Test json rpc arguments
...
In particular, check buggy behavior around embedded quoted JSON
and Postgres versions, compare
https://www.postgresql.org/message-id/D6921B37-BD8E-4664-8D5F-DB3525765DCD%40vllmrt.net
This adds version-bounded tests for the handling of quoted JSON,
and a pending test that documents the assumption that Postgres >=10
intends to parse quoted JSON as a string (similar to how jsonb works
now).
2019-06-02 01:26:52 -05:00
Robert Vollmert and Steve Chávez
65fc672417
Change tests to use postgres-json-schema instead of hjsonschema.
...
Embeds https://github.com/gavinwahl/postgres-json-schema .
2019-06-01 23:26:33 -05:00
Xavier Francisco and Steve Chávez
28b3d6cafd
Update stylish haskell config; apply all; add CI config ( #1299 )
...
* Update config default; Copy non-defaults
* Update .stylish-haskell config version to match pgrst
* Apply stylish haskell to all files
* CircleCI config
* Remove redundant import.
What is used from Network.HTTP.Types.Headers is also exported by Network.HTTP.Types.
* Grouped imports
* Show un-styled files on CircleCI failure
* Fix styling imports
* Apply adhoc standard correctly
2019-05-23 10:44:34 -05:00
steve-chavez
40b004c9f7
Comment OpenAPI tests that time out
...
These should be run locally for now.
2019-04-05 19:10:00 -05:00
fpusch and Steve Chávez
cefbe8f07f
Add numeric and character types to OpenAPI spec ( #1259 )
...
* Add numeric and character types
* Remove decimal type mapping
It is treated as numeric by PostgreSQL so the mapping was redundant.
2019-03-29 11:09:42 -05:00
steve-chavez
dadfe965b9
Do hlint 2.1 hints
2018-11-06 11:54:10 -05:00
mdr1384 and Steve Chávez
dfa9055c34
Close #1158 , Add summary to OpenAPI doc for RPC functions ( #1170 )
2018-08-27 10:22:21 -05:00
Alexey Alekhin and Steve Chávez
70e95649fd
OpenAPI: Change GET response type to array ( #1149 )
2018-07-24 12:26:45 -05:00
Alexey Alekhin and Steve Chávez
2b46afe1ec
OpenAPI: add required section for the non-nullable columns ( #1148 )
2018-07-23 11:11:45 -05:00
steve-chavez
69a76a627f
Close #1145 , OpenAPI materialized view columns
2018-07-18 09:43:42 -05:00
steve-chavez
ca76a8e6be
Update links, add patreon badge
2018-05-14 18:44:52 -05:00
steve-chavez
30cf1d100a
Add foreign tables to OpenAPI output
2018-05-07 10:14:26 -05:00
steve-chavez
85d9feeeab
Add set schema to middleware
...
Fix #828 , breaking change: computed columns now only work if they are on
the config schema.
Fix #835 , tests now not depend on the search_path of the
postgrest_test_authenticator.
2018-01-10 09:50:20 -05:00
steve-chavez
7a3f350f1c
Fix bad OpenAPI output when having functions with OUT/INOUT params
2017-10-09 10:45:17 -05:00
Steve Chávez and Joe Nelson
4ba27d84a4
Fix some OpenAPI issues ( #970 )
...
* Fix #933 , update externals docs url to current version
* Fix #962 , openApi don't err on nonexistent schema
* Fix #954 , make OpenAPI rpc output dependent on user privileges
2017-09-25 23:09:52 -07:00
daurnimator and Joe Nelson
c72bc37630
OpenAPI: Split table comment into summary and description ( #931 )
2017-08-15 09:52:20 -05:00
Lucas Desgouilles and Joe Nelson
6d5f72bf5f
Update OpenAPI (SQL COMMENT to description, constraints, cleaning up) ( #885 )
2017-07-22 10:56:23 -05:00
dsimunic and Joe Nelson
ae40641963
Introduce new 'Prefer' header, params=single-object ( #739 )
2016-11-20 14:14:39 -08:00
Joe Nelson and GitHub
74e68408e6
Bring packages up to date ( #722 )
...
* Bring packages up to date
* New LTS includes deps now
Use stack to select most versions
* Alphabetize packages
* Strip down packages
Switch tests to protolude
* Appease cabal check with base version constraint
2016-10-19 22:25:58 -07:00
Joe Nelson
a88a704bef
Parse proc arg definitions that have multi-word types
2016-09-22 23:30:47 -07:00
Joe Nelson
539df21627
WIP: more comprehensive test of rpc args
...
Breaks toks2arg
2016-09-21 23:54:08 -07:00
Joe Nelson
0314f4bdea
First test of OpenAPI RPC params
2016-09-21 20:34:03 -07:00
Joe Nelson and GitHub
1d5a0e4316
Per-route content negotiation, and OpenAPI only for root ( #693 )
...
* WIP: remove non-openapi root spec
* Refactor ContentType
Different endpoints will favor one type over another
* Permit different Accept headers per endpoint
* Lint
* Add charset to Content-Type only when used as a header
Keep it out of error messages
* Accept: */* is last resort, not first
* Changelog
* makeMimeList consistently
* Remove schema description from OPTIONS response
2016-08-19 16:07:22 -07:00
Jacky Hu
1fef1991ef
Add proxy awareness for OpenAPI spec generation
...
Proxy uri from command line options takes precedence over host and port
2016-07-07 19:20:40 +08:00
Joe Nelson and GitHub
acd75a3997
Merge pull request #639 from hudayou/swagger2
...
Provide a swagger2 spec for the dynamic API
2016-06-20 15:12:58 -07:00
Martin Gammelsæter and Joe Nelson
46b3ce5631
Name custom types and domains on OPTIONS requests ( #640 )
2016-06-20 09:49:52 -07:00
Jacky Hu
1a25bb501f
Add 415 test for openapi req on none root path
2016-06-18 10:18:43 +08:00
Jacky Hu
0220040341
Add test to validate openapi spec
2016-06-18 10:18:43 +08:00
Jacky Hu
c10bde8d65
Add a simple test for openapi
2016-06-18 10:18:43 +08:00
Jacky Hu
d1ed884a8d
Introduce the OpenAPI header
...
Also bring back the original behavior of GET "/"
2016-06-18 10:18:43 +08:00
Jacky Hu
4b0c5cb36f
Disable schema test
2016-06-18 10:18:43 +08:00
Joe Nelson
e315dbc91e
Include allow header in options response ( #628 )
2016-06-08 23:12:29 -07:00
Joe Nelson
cf16f90fab
Merge pull request #590 from begriffs/proper-403
...
Return proper 401/403 when access denied
2016-05-17 22:56:55 -07:00
Ruslan Talpa
9e6542680b
Fix include entities from the same parent table using two different foreign keys
2016-05-16 15:36:18 +03:00
Joe Nelson
18e3c30ad8
Return proper 401/403 when access denied
...
Fixes #584
2016-05-15 00:56:47 -07:00
Ruslan Talpa
62af792add
Add failing test to test correct view column detection
2016-02-29 11:37:23 +02:00
Joe Nelson
d7fe59f0b0
WIP: share server code between tests and program
...
- Share server code in Main
- Switch to hasql-pool
- Use pool in tests
- DRY up test runner
2016-02-21 12:22:18 -08:00
calebmer and Joe Nelson
33757e537b
Fix options on non existant tables, closes #442
2016-02-03 11:20:45 -08:00
Joe Nelson
b9fd083c77
It all compiles but all requests give a postgres error
2016-01-24 18:09:19 -08:00
Joe Nelson
fec316b087
WIP: fixing compiler errors in specs
2016-01-24 18:09:19 -08:00
Simone Scarduzio
74d76c690f
Adding two test cases for 469
2016-01-24 14:52:14 +00:00
calebmer
3a3d4038cb
Add tests for wierd usecases
2015-12-29 15:24:27 -05:00
Ruslan Talpa
4544ce3255
Fix #399 insert records in tables with no SELECT privileges
2015-12-16 10:16:14 +02:00
Joe Nelson
b3144aee15
Cache schema structure between tests for speed
...
Causes one test to fail
2015-12-10 13:36:28 -08:00
Ruslan Talpa
a6512a2a69
Test and fixes for #407 #403 #107
2015-12-09 20:59:42 +02:00
Diogo Biazus
63805d05a1
Removes GRANT ALL and let Structure spec pending
2015-12-08 11:11:48 -05:00
Joe Nelson
f4c73c7666
Test for --max-rows behavior
2015-12-05 19:31:53 -08:00
calebmer
16af8fc61e
Better relations for views
...
- Better column synonyms detection
- Raise relations to accessible schema when possible
2015-11-11 09:11:57 -05:00
calebmer
7560fafbab
Refactor DbStructure
...
- Rename `dbstructure` to `db` in App.hs
- Rename PgStructure* to DbStructure*
- Move `DbStructure` creation to DbStructure.hs
2015-11-11 09:03:06 -05:00
Diogo Biazus
a192cadced
All green :D
2015-10-20 19:23:12 -04:00