package com.kapdion.omds.productdefinitions;

import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/produktApi") // Dein Pfad
public class HydraController {

    @GetMapping(value = "/vocab", produces = "application/ld+json")
    public Resource getVocab() {
        // Lädt die Datei aus dem api-definition Modul
        return new ClassPathResource("vocab.jsonld");
    }

    @GetMapping(value = "/context", produces = "application/ld+json")
    public Resource getContext() {
        return new ClassPathResource("context.jsonld");
    }
}