Giter Site home page Giter Site logo

vng-realisatie / documenten-api Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 8.0 2.27 MB

Documenten API ontsloten in een Documentregistratiecomponent (DRC)

Home Page: https://vng-realisatie.github.io/gemma-zaken/

License: Other

Shell 0.50% Python 95.01% HTML 1.64% JavaScript 0.69% Dockerfile 0.47% Batchfile 0.12% SCSS 1.58%
api-specification

documenten-api's Issues

Missing tests

I'm missing tests that show it's possible to create/retrieve uploaded files. These tests should go in the src/drc/api/tests/ directory

File uploads should not all end up in the same directory

Specifically - you need an upload_to argument for models.FileField, because at some point you'll run into the limit of how many files you can actually keep in one directory (settings.MEDIA_ROOT in this case). Using year/month subfolders should be sufficient

404 Client Error bij verzoek naar ZRC voor informatieobjecten

Ik probeer een nieuwe Melding Openbare Ruimte toe te voegen met de gemma-zaken-demo applicatie. Het werkt prima zonder bijlage, maar met bijlage krijg ik de volgende foutmelding op de demo applicatie:

image

Verzoek / antwoord ziet er als volgt uit:

image

image

Wanneer ik handmatig in de admin van gemma-drc een objectinformatieobject probeer aan te maken dan krijg ik ook de foutmelding: "Could not create remote relation":

image

Het interessante is dat in de stack trace de volgende foutmelding staat:

image

Let met name op de dubbel slash: /api/v1//zaken/..., dat klopt inderdaad niet, hier krijg ik ook een 404 op. Met enkele slash kan ik de URL vanuit mijn browser benaderen.

Wat meer stack trace:

image

Waar komt deze dubbele slash vandaan?

Site-configuratie moet makkelijker/duidelijker zijn

Nu is er de (verborgen) IS_HTTPS envvar die gebruikt wordt om interne URLs op te bouwen buiten de request-response cycle. Het zou handig zijn als dit op de site (in de DB) kan geconfigureerd worden.

Verder is getting-started documentatie wel handig om het onboarden te versoepelen.

(cc/ @bartjkdp)

File upload should allow all file types

I know it's in the library - the check happens here:

        if file_extension not in self.ALLOWED_TYPES:
                raise ValidationError(self.INVALID_TYPE_MESSAGE)

A clever workaround would be:

class AnyFileType:
    def __contains__(self, item):
        return True

...
class SomeField(...):
    ALLOWED_TYPES = AnyFileType()

CustomBase64File as a field name is a bit weird too - maybe name it AnyBase64File?

URLs should expose resources in plural

in drc.api.urls:

router.register('enkelvoudiginformatieobject', EnkelvoudigInformatieObjectViewSet)

should be

router.register('enkelvoudiginformatieobjecten', EnkelvoudigInformatieObjectViewSet)

Bugs in stable/1.0.x branch

  • In various places, the content type of application/problem+json has turned into application/json
  • The release notes include 1.1.x features for the 1.0.2 version

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.