{"openapi":"3.1.0","info":{"title":"Limpide tools","version":"1.0.0","description":"Verified maths exercises for tutors, human or AI: product equations (équations produit) of degree 2 and 3, first year of maturité, in French (Swiss course conventions) or English. Each exercise is built from its solutions, so its answer key is always right. Each one sets a named trap, the error it tests (hidden common factor, difference of squares, sum of squares, x as a common factor, grouping, perfect square). Returns the statement for the student and, for the tutor only, the solution set, explained steps with the trap step and its note, and figureUrl: the graph of the function, whose zeros are the solutions. Never show the solution to the student. Give a seed to get the same exercise again; its id names it. Deterministic: use this instead of writing exercises and answer keys yourself."},"servers":[{"url":"https://tools.limpide.ai"}],"paths":{"/api/v1/exercises":{"get":{"operationId":"generateExercises","summary":"Verified exercises, built from their solutions.","parameters":[{"name":"topic","in":"query","required":false,"description":"product-equations: équations produit of degree 2 and 3, solved by factoring (first year of maturité).","schema":{"default":"product-equations","type":"string","enum":["product-equations"]}},{"name":"trap","in":"query","required":false,"description":"The error the exercise tests. Leave it out and the seed chooses one; the answer names it.","schema":{"type":"string","enum":["common-factor-in-brackets","difference-of-squares","sum-of-squares","x-common-factor","grouping","perfect-square"]}},{"name":"seed","in":"query","required":false,"description":"The same seed (with the same trap) always gives the same exercise. Leave it out for a new one.","schema":{"type":"integer","minimum":0,"maximum":2147483647}},{"name":"count","in":"query","required":false,"description":"How many exercises, from 1 to 20. With a seed, they use seed, seed + 1, and so on.","schema":{"default":1,"type":"integer","minimum":1,"maximum":20}},{"name":"lang","in":"query","required":false,"description":"Language of the statement and the solution: fr (Swiss course conventions) or en.","schema":{"default":"en","type":"string","enum":["fr","en"]}}],"responses":{"200":{"description":"The exercises.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"exercises":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"product-equations/<trap>/<seed>: enough to get the same exercise again."},"topic":{"type":"string","const":"product-equations"},"seed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lang":{"type":"string","enum":["fr","en"]},"trap":{"type":"string","enum":["common-factor-in-brackets","difference-of-squares","sum-of-squares","x-common-factor","grouping","perfect-square"]},"trapName":{"type":"string"},"instruction":{"type":"string"},"statement":{"type":"string","description":"The instruction and the equation, as plain text: what the student gets."},"statementLatex":{"type":"string","description":"The equation alone, in LaTeX."},"equation":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Everything moved to the left, as coefficients from the constant term up."},"solution":{"type":"object","properties":{"set":{"type":"array","items":{"type":"string"},"description":"The real solutions, ascending, as integers or fractions (\"-2/3\")."},"setText":{"type":"string"},"setLatex":{"type":"string"},"factored":{"type":"string","description":"y = the left side minus the right side, factored: what the figure draws."},"steps":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"math":{"type":"object","properties":{"text":{"type":"string"},"latex":{"type":"string"}},"required":["text","latex"],"additionalProperties":false},"trapNote":{"description":"On the step the trap is about: what students get wrong there.","type":"string"}},"required":["text"],"additionalProperties":false}}},"required":["set","setText","setLatex","factored","steps"],"additionalProperties":false,"description":"For the tutor, never shown to the student."},"figureUrl":{"type":"string","description":"SVG of the graph of the function; its zeros are the solutions. Part of the solution."},"figureAlt":{"type":"string"}},"required":["id","topic","seed","lang","trap","trapName","instruction","statement","statementLatex","equation","solution","figureUrl","figureAlt"],"additionalProperties":false}}},"required":["exercises"],"additionalProperties":false}}}},"400":{"description":"An invalid query parameter.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}}}}}}}}}}